wangsheng
2021-12-01 5944b55b1486943c696a3beb004d564dceb81cf2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 
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
{
    
    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);
        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("", "", "");
            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();
        }
    }
}