Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         RDP_StartTime.SelectedDate = Convert.ToDateTime(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd 00:00:00.000"));
         RDP_EndTime.SelectedDate   = DateTime.Now;
         var personinfo = CurrentSession.Personnel.Get();
         var items      = _purchaseSet.GetPersonList();
         foreach (var item in items)
         {
             item.PersonResponsibleName = _personnelSao.GetName(item.PersonResponsible);
         }
         RCB_Pm.DataSource     = items;
         RCB_Pm.DataTextField  = "PersonResponsibleName";
         RCB_Pm.DataValueField = "PersonResponsible";
         RCB_Pm.DataBind();
         if (items.FirstOrDefault(ent => ent.PersonResponsible == personinfo.PersonnelId) != null)
         {
             RCB_Pm.SelectedValue = personinfo.PersonnelId.ToString();
         }
         RCB_Pm.Items.Insert(0, new RadComboBoxItem("负责人列表", Guid.Empty.ToString()));
         var wList = WMSSao.GetWarehouseAuthDics(personinfo.PersonnelId);
         RCB_Warehouse.Items.Insert(0, new RadComboBoxItem("授权仓库列表", Guid.Empty.ToString()));
         RCB_Warehouse.DataSource = wList;
         RCB_Warehouse.DataBind();
         if (wList.Count == 1)
         {
             RCB_Warehouse.SelectedValue = wList.First().Key.ToString();
         }
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                AllSourceList             = CacheCollection.Filiale.GetList().ToDictionary(ent => ent.ID, ent => ent.Name);
                RCB_OrderState.DataSource = GetOrderStateList().OrderBy(w => w.Key).ToList();
                RCB_OrderState.DataBind();

                var personinfo = CurrentSession.Personnel.Get();
                var wList      = WMSSao.GetWarehouseAuthDics(personinfo.PersonnelId);
                RCB_Warehouse.DataSource = wList;
                RCB_Warehouse.DataBind();


                var yearlist = new List <int>();
                for (var i = 2007; i <= (DateTime.Now.Year - GlobalConfig.KeepYear); i++)
                {
                    yearlist.Add(i);
                }
                DDL_Years.DataSource = yearlist.OrderByDescending(y => y);
                DDL_Years.DataBind();
                DDL_Years.Items.Add(new ListItem(GlobalConfig.KeepYear + "年内数据", "0"));
                DDL_Years.SelectedValue = "0";

                YearsSelectedIndex();
                BindWebSiteInfo();
            }
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         var personnelInfo = CurrentSession.Personnel.Get();
         //获取授权仓库列表
         AuthWarehouses             = WMSSao.GetWarehouseAuthDics(personnelInfo.PersonnelId);
         RDP_StartTime.SelectedDate = DateTime.Now.AddMonths(-1);
         RDP_EndTime.SelectedDate   = DateTime.Now;
     }
 }