protected void ddXMProject_SelectedIndexChanged(object sender, EventArgs e) { if (ddXMProject.Value.ToString().Trim().Length > 0) { var projectList = base.XMProjectService.GetXMProjectListSS(HozestERPContext.Current.User.CustomerID, 0) .GroupBy(p => new { p.Id, p.ProjectName }) .Select(p => new { Id = p.Key.Id, ProjectName = p.Key.ProjectName }); string paramprojectIDs = ""; string paramprojectIDSelect = this.ddXMProject.Value.ToString(); if (paramprojectIDSelect == "-1" || paramprojectIDSelect == "99") { for (int i = 0; i < projectList.ToList().Count; i++) { paramprojectIDs = paramprojectIDs + projectList.ToList()[i].Id + ","; } paramprojectIDs = paramprojectIDs.Substring(0, paramprojectIDs.Length - 1) + ",-1"; } else { paramprojectIDs = paramprojectIDSelect; } var wareHouses = base.XMWareHousesService.GetXMWarehouseListByProjectIds(paramprojectIDs); Ext.Net.Store Store = ddlwareHouses.GetStore(); Store.DataSource = wareHouses; Store.DataBind(); //ddlwareHouses.SelectedIndex = 0; } }
//项目数据绑定 private void BindddXMProject() { #region 项目名称绑定 //项目名称绑定--选取自运营项目 if (HozestERPContext.Current.User.CustomerID == 7 || HozestERPContext.Current.User.CustomerID == 84 || HozestERPContext.Current.User.CustomerID == 658 || HozestERPContext.Current.User.CustomerID == 682 || HozestERPContext.Current.User.CustomerID == 670) { ddXMProject.Items.Clear(); var projectList = base.XMProjectService.GetXMProjectList(); Ext.Net.Store Store = ddXMProject.GetStore(); projectList.Add(new XMProject() { ProjectName = "---所有---", Id = -1, }); Store.DataSource = projectList.OrderBy(a => a.Id); Store.DataBind(); ddXMProject.SelectedIndex = 0; ddXMProject.Value = "-1"; } else { ddXMProject.Items.Clear(); var projectList = base.XMProjectService.GetXMProjectListSS(HozestERPContext.Current.User.CustomerID, 0) .GroupBy(p => new { p.Id, p.ProjectName }) .Select(p => new { Id = p.Key.Id, ProjectName = p.Key.ProjectName }); if (projectList.Count() == 0) { Ext.Net.ListItem liProject = new Ext.Net.ListItem(); liProject.Text = "---无项目权限---"; liProject.Value = "0"; ddXMProject.Items.Add(liProject); ddXMProject.Value = 0; } else { Ext.Net.Store Store = ddXMProject.GetStore(); Store.DataSource = projectList; Store.DataBind(); ddXMProject.SelectedIndex = 0; ddXMProject.Value = projectList.ToList()[0].Id; Ext.Net.ListItem liProject1 = new Ext.Net.ListItem(); liProject1.Text = "---所有---"; liProject1.Value = "99"; ddXMProject.Items.Add(liProject1); ddXMProject.Value = 99; } } #endregion }
private void BindNick() { ddlNick2.Items.Clear(); var nickList = base.XMOrderInfoAPIService.GetXMNickList("", Convert.ToInt32(true), Convert.ToInt32(ddXMProject.Value)); Ext.Net.Store Store = ddlNick2.GetStore(); nickList.Add(new XMNick() { nick = "---所有---", nick_id = -1, }); Store.DataSource = nickList.OrderBy(a => a.nick_id); Store.DataBind(); ddlNick2.SelectedIndex = 0; ddlNick2.Value = "-1"; }
private void BindddXMProject() { ddXMProject.Items.Clear(); var projectList = base.XMProjectService.GetXMProjectList(); Ext.Net.Store Store = ddXMProject.GetStore(); projectList.Add(new XMProject() { ProjectName = "---所有---", Id = -1, }); Store.DataSource = projectList.OrderBy(a => a.Id); Store.DataBind(); ddXMProject.SelectedIndex = 0; ddXMProject.Value = "-1"; }
public void BindGrid(int paramPageIndex, int paramPageSize) { try { string BeginDate = txtBeginDate.Value.Trim(); string EndDate = txtEndDate.Value.Trim(); List <XMLogisticsProject> list = XMLogisticsInfoService.getXMLogisticsProjectList(BeginDate, EndDate, ddlLogisticsCompany.Text); Ext.Net.Store Store1 = GridPanel1.GetStore(); Store1.DataSource = list; Store1.DataBind(); } catch (Exception ex) { Ext.Net.ExtNet.Msg.Alert("提示", ex.Message).Show(); } }
protected void ddXMProject2_SelectedIndexChanged(object sender, EventArgs e) { if (ddXMProject.Value.ToString().Trim().Length > 0) { var nickList = base.XMOrderInfoAPIService.GetXMNickList("", Convert.ToInt32(true), Convert.ToInt32(ddXMProject.Value)); ddlNick2.Items.Clear(); Ext.Net.Store Store = ddlNick2.GetStore(); nickList.Add(new XMNick() { nick = "---所有---", nick_id = -1, }); Store.DataSource = nickList.OrderBy(a => a.nick_id); Store.DataBind(); ddlNick2.SelectedIndex = 0; if (!Page.IsPostBack) { ddlNick2.Value = "-1"; } } }