|
using Common;
|
using Dao;
|
using Model;
|
using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using System.Web;
|
using System.Web.Profile;
|
using System.Web.SessionState;
|
|
public partial class _GwStatisRefund : PageBase<SysUser>, IRequiresSessionState
|
{
|
|
private int _userId = -1;
|
private int _userType = -1;
|
private string _account = "";
|
string permissionsSQL = null;
|
|
public string SelectedSpID { get; set; }
|
|
public string StatisType { get; set; }
|
|
public StatisOption SelectedOptions { get; set; }
|
|
public DateTime StartTime { get; set; }
|
|
public DateTime EndTime { get; set; }
|
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
this.CheckRight("502", FailedOperation.ErrorMsgOnly);
|
permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null);
|
if (this.IsPostBack)
|
return;
|
this.SelectedOptions = StatisOption.None;
|
this.StartTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
|
this.EndTime = this.StartTime.AddMonths(1).AddDays(-1.0);
|
this.SelectedSpID = string.Empty;
|
}
|
|
protected string GenerateSpIDOptions()
|
{
|
StringBuilder stringBuilder = new StringBuilder();
|
using (GwSpDao gwSpDao = new GwSpDao())
|
{
|
List<GwSp> list = gwSpDao.LoadInfoList("", "", "", permissionsSQL);
|
if (list.Count == 0)
|
{
|
stringBuilder.Append("<option value=\"\">暂无客户信息</option>");
|
}
|
else
|
{
|
stringBuilder.Append("<option value=\"\">所有帐号</option>");
|
foreach (GwSp gwSp in list)
|
{
|
if (this.AppContext.HasRight("502"))
|
stringBuilder.AppendFormat("<option value=\"{0}\" {3}>{1}-{2}</option>", (object)gwSp.SpID, (object)gwSp.ClientID, (object)gwSp.SpID, gwSp.SpID == this.SelectedSpID ? (object)"selected" : (object)"");
|
}
|
}
|
return stringBuilder.ToString();
|
}
|
}
|
}
|