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(); } }
/// <summary>加载数据 /// </summary> private void LoadShowData() { //加载销售公司 var list = CacheCollection.Filiale.GetHeadList().Where(ent => ent.IsActive && ent.FilialeTypes.Contains((int)FilialeType.SaleCompany)); RCB_SaleFiliale.DataSource = list; RCB_SaleFiliale.DataTextField = "Name"; RCB_SaleFiliale.DataValueField = "ID"; RCB_SaleFiliale.DataBind(); RCB_SaleFiliale.Items.Insert(0, new RadComboBoxItem("全部", Guid.Empty.ToString())); RCB_SaleFiliale.SelectedIndex = 0; //销售平台 RCB_SalePlatform.Items.Insert(0, new RadComboBoxItem("全部", Guid.Empty.ToString())); RCB_SalePlatform.SelectedIndex = 0; //会员余额操作类型枚举 var typeList = EnumAttribute.GetDict <MemberBalanceChangeTypeEnum>(); RCB_Type.DataSource = typeList; RCB_Type.DataBind(); RCB_Type.Items.Insert(0, new RadComboBoxItem("全部", "0")); RCB_Type.SelectedIndex = 0; //会员余额操作状态枚举 var stateList = EnumAttribute.GetDict <MemberBalanceChangeStateEnum>(); RCB_State.DataSource = stateList; RCB_State.DataBind(); RCB_State.Items.Insert(0, new RadComboBoxItem("全部", "0")); RCB_State.SelectedValue = "2";//首次默认显示待确认状态 //时间控件 RDP_StartTime.MaxDate = DateTime.Now; RDP_StartTime.SelectedDate = DateTime.Now.AddDays(-30); RDP_EndTime.SelectedDate = DateTime.Now; StartTime = RDP_StartTime.SelectedDate.Value; EndTime = RDP_EndTime.SelectedDate.Value; }