protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DateTime   datetime = StaticResource.Instance.GetReportDateTime();
                int        finYear  = datetime.Year;
                List <int> Year     = new List <int>();
                for (int i = -5; i < 5; i++)
                {
                    Year.Add(DateTime.Now.Year + i);
                }
                FinsYear.DataSource = Year;
                FinsYear.DataBind();

                FinsYear.SelectedValue        = finYear.ToString();
                DocMutipleUpload.FinValueYear = finYear.ToString();
                List <C_System> sysList = new List <C_System>();
                if (PermissionList != null && PermissionList.Count > 0)
                {
                    foreach (var item in PermissionList)
                    {
                        sysList.AddRange(StaticResource.Instance.SystemList.Where(p => p.SystemName == item.ToString()).ToList());
                    }
                }
                if (sysList.Count > 0)
                {
                    ddlSystem.DataSource = sysList.Distinct().ToList().OrderBy(or => or.Sequence).ToList();
                }
                else
                {
                    ddlSystem.DataSource = StaticResource.Instance.SystemList.ToList();
                }


                ddlSystem.DataTextField  = "SystemName";
                ddlSystem.DataValueField = "ID";
                ddlSystem.DataBind();//绑定前台下拉框
                DocMutipleUpload.LoadByBusinessID("");



                //List<C_DocumentTree> Select1 = new List<C_DocumentTree>();
                //Select1 = C_DocumentTreeOperator.Instance.GetTypeList(Guid.Parse("99999999-9999-9999-9999-FFFFFFFFFFFF"));
                //ValueA.DataSource = Select1;
                //ValueA.DataTextField = "TreeNodeName";
                //ValueA.DataValueField = "ID";
                //ValueA.DataBind();//绑定前台下拉框
                //ValueA.Items.Insert(0, new ListItem("请选择", "0"));
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DateTime   datetime = StaticResource.Instance.GetReportDateTime();
                int        finYear  = datetime.Year;
                List <int> Year     = new List <int>();
                for (int i = -5; i < 5; i++)
                {
                    Year.Add(DateTime.Now.Year + i);
                }
                FinsYear.DataSource = Year;
                FinsYear.DataBind();

                FinsYear.SelectedValue = finYear.ToString();
                List <C_System> sysList = new List <C_System>();
                if (PermissionList != null && PermissionList.Count > 0)
                {
                    foreach (var item in PermissionList)
                    {
                        sysList.AddRange(StaticResource.Instance.SystemList.Where(p => p.SystemName == item.ToString()).ToList());
                    }
                }
                if (sysList.Count > 0)
                {
                    ddlSystem.DataSource = sysList.Distinct().ToList().OrderBy(or => or.Sequence).ToList();
                }
                else
                {
                    ddlSystem.DataSource = StaticResource.Instance.SystemList.ToList();
                }


                ddlSystem.DataTextField  = "SystemName";
                ddlSystem.DataValueField = "ID";
                ddlSystem.DataBind();//绑定前台下拉框


                DocMutipleUpload.LoadByBusinessID("");
            }
        }