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(); } } }
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(); } }
private void GetWarehouseList() { RCB_Warehouse.Text = String.Empty; RCB_Warehouse.Items.Clear(); RCB_Warehouse.DataSource = CurrentSession.Personnel.WarehouseList; RCB_Warehouse.DataBind(); RCB_Warehouse.Items.Insert(0, new RadComboBoxItem("请选择仓库", Guid.Empty.ToString())); RCB_Warehouse.SelectedIndex = 0; }
/// <summary>绑定入库仓储 /// </summary> private void BindWarehouse() { var wList = CurrentSession.Personnel.WarehouseList; RCB_Warehouse.DataSource = wList; RCB_Warehouse.DataTextField = "WarehouseName"; RCB_Warehouse.DataValueField = "WarehouseId"; RCB_Warehouse.DataBind(); RCB_Warehouse.Items.Insert(0, new RadComboBoxItem("请选择", Guid.Empty.ToString())); }
private void BindWarehouse() { var warehouseList = CurrentSession.Personnel.WarehouseList; if (warehouseList.Count == 0) { RAM.Alert("您没有授权的仓库,需要开放权限请咨询相关人员!"); return; } RCB_Warehouse.DataSource = warehouseList; RCB_Warehouse.DataTextField = "WarehouseName"; RCB_Warehouse.DataValueField = "WarehouseId"; RCB_Warehouse.DataBind(); }
private void BindInStock() { var personnel = CurrentSession.Personnel.Get(); var result = WMSSao.GetWarehouseAuthDic(personnel.PersonnelId); WarehouseAuth = result; RCB_Warehouse.DataSource = result != null && result.WarehouseDics != null ? result.WarehouseDics : new Dictionary <Guid, string>(); RCB_Warehouse.DataTextField = "Value"; RCB_Warehouse.DataValueField = "Key"; RCB_Warehouse.DataBind(); if (result != null && result.WarehouseDics != null && result.WarehouseDics.Count > 0) { RCB_Warehouse.SelectedValue = result.WarehouseDics.First().Key.ToString(); } }
private void GetWarehouseList() { RCB_Warehouse.Text = String.Empty; RCB_Warehouse.Items.Clear(); var newList = new List <WarehouseAuth> { new WarehouseAuth { WarehouseId = Guid.Empty, WarehouseName = "全部仓库" } }; newList.AddRange(CurrentSession.Personnel.WarehouseList); RCB_Warehouse.DataSource = newList; RCB_Warehouse.DataBind(); }
/// <summary> /// 获取仓库信息 /// </summary> /// <param name="eval"></param> /// <param name="isOut"></param> /// <returns></returns> private void GetWarehouseList() { var result = WMSSao.GetWarehouseAuthDic(Personnel.PersonnelId); var warehouseList = new Dictionary <Guid, string> { { Guid.Empty, "请选择仓库" } }; RCB_Warehouse.Text = String.Empty; RCB_Warehouse.Items.Clear(); RCB_Warehouse.DataSource = result != null?warehouseList.Union(result.WarehouseDics) : warehouseList; RCB_Warehouse.DataBind(); RCB_Warehouse.SelectedIndex = 0; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AllCompanyList = _companyCussent.GetCompanyCussentList(); AllCompanyBalanceList = _companyCussent.GetCompanyBalanceList(); AllCompanyClassList = _companyClass.GetCompanyClassList(); AllCompanyBalanceDetailList = _companyCussent.GetCompanyBalanceDetailList(); Dictionary <Guid, string> dataSource = new Dictionary <Guid, string> { { Guid.Empty, "--所有--" } }; RCB_Warehouse.DataSource = dataSource.Union(WMSSao.GetAllCanUseWarehouseDics()); var filialeList = FilialeList.Where(f => f.FilialeTypes.Contains((int)FilialeType.SaleCompany) || f.FilialeTypes.Contains((int)FilialeType.LogisticsCompany) && !f.FilialeTypes.Contains((int)FilialeType.EntityShop)); RCB_FilialeList.DataSource = filialeList; var personnelInfo = CurrentSession.Personnel.Get(); if (personnelInfo.CurrentFilialeId == Guid.Empty) { personnelInfo.CurrentFilialeId = filialeList.First().ID; CurrentSession.Personnel.Set(personnelInfo); } SelectFilialeId = personnelInfo.CurrentFilialeId; GetCompanyCussent(); RCB_Warehouse.DataBind(); RCB_FilialeList.DataTextField = "Name"; RCB_FilialeList.DataValueField = "ID"; RCB_FilialeList.DataBind(); RCB_FilialeList.SelectedValue = string.Format("{0}", personnelInfo.CurrentFilialeId); RDP_StartDate.SelectedDate = DateTime.Now.AddDays(-30); RDP_EndDate.SelectedDate = DateTime.Now; } if (GetPowerOperationPoint("CBIsOut") && !string.IsNullOrWhiteSpace(RCB_FilialeList.SelectedValue) && new Guid(RCB_FilialeList.SelectedValue) != Guid.Empty) { CB_IsOut.Visible = true; } else { CB_IsOut.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { _submitController = CreateSubmitInstance(); if (!IsPostBack) { //绑定借记单状态 RCB_State.DataSource = GetDebitNoteStateList(); RCB_State.DataBind(); //绑定仓库 RCB_Warehouse.DataSource = WarehouseDic; RCB_Warehouse.DataBind(); //绑定责任人 RCB_Persion.DataSource = PersonnelList; RCB_Persion.DataBind(); //绑定供应商 RCB_Company.DataSource = CompanyCussentList; RCB_Company.DataBind(); } }