protected void Page_Load(object sender, EventArgs e) { loginService.HaveUrlRight(); if (!X.IsAjaxRequest) { if (!Page.IsPostBack) { Store1.DataSource = AvailableSofts; Store1.DataBind(); comboxSofts.SelectedIndex = 0; var platList = AvailableSofts[0].Platforms.Where(a => a != MobileOption.IPAD && a != MobileOption.AndroidPad).Select(p => new { PlatID = (int)p, PlatName = p.GetDescription() }).ToList(); Store2.DataSource = platList; Store2.DataBind(); comboxSofts.SelectedItem.Value = AvailableSofts[0].ID.ToString(); comboxPlats.SelectedItem.Value = platList[0].PlatID.ToString(); isSearch.Text = "1"; //添加版本增加的代码 Store4.DataSource = AvailableSofts; Store4.DataBind(); add_comboxSofts.SelectedIndex = 0; Store5.DataSource = platList; Store5.DataBind(); add_comboxSofts.SelectedItem.Value = AvailableSofts[0].ID.ToString(); add_comboxPlats.SelectedItem.Value = platList[0].PlatID.ToString(); } } }
public void SetPlat2() { var plats = AvailableSofts.Find(p => p.ID == Convert.ToInt32(add_comboxSofts.SelectedItem.Value)).Platforms.Where(a => a != MobileOption.IPAD && a != MobileOption.AndroidPad).Select(p => new { PlatID = (int)p, PlatName = p.GetDescription() }).ToList(); Store5.DataSource = plats; Store5.DataBind(); add_comboxPlats.SelectedItem.Value = plats[0].PlatID.ToString(); }
protected void documentsStore_ReadData(object sender, StoreReadDataEventArgs e) { //GEtting the filter from the page string filter = string.Empty; int totalCount = 1; //Fetching the corresponding list //in this test will take a list of News DocumentListRequest request = new DocumentListRequest(); request.Status = 0; request.Filter = ""; ListResponse <AdminDocument> routers = _administrationService.ChildGetAll <AdminDocument>(request); if (!routers.Success) { Common.errorMessage(routers); return; } if (!string.IsNullOrEmpty(DeptId1.Text)) { Store1.DataSource = routers.Items.Where(x => x.departmentId == DeptId1.Text); Store1.DataBind(); } if (!string.IsNullOrEmpty(DeptId2.Text)) { Store2.DataSource = routers.Items.Where(x => x.departmentId == DeptId2.Text); Store2.DataBind(); } if (!string.IsNullOrEmpty(DeptId3.Text)) { Store3.DataSource = routers.Items.Where(x => x.departmentId == DeptId3.Text); Store3.DataBind(); } if (!string.IsNullOrEmpty(DeptId4.Text)) { Store3.DataSource = routers.Items.Where(x => x.departmentId == DeptId4.Text); Store4.DataBind(); } if (!string.IsNullOrEmpty(DeptId5.Text)) { Store5.DataSource = routers.Items.Where(x => x.departmentId == DeptId5.Text); Store5.DataBind(); } if (!string.IsNullOrEmpty(DeptId6.Text)) { Store6.DataSource = routers.Items.Where(x => x.departmentId == DeptId6.Text); Store6.DataBind(); } }
protected void province_Select(object sender, DirectEventArgs e) { string province = cbProvince.Text; //城市数据 var cityList = AreaCodeService.GetAreaCodeByCity(3, province); Store5.DataSource = cityList; Store5.DataBind(); cbCity.Clear(); cbArea.Clear(); }
private void BindData()//基础信息绑定 { if (SessionBox.GetUserSession().rolelevel.Trim().IndexOf("1") > -1) { Store5.DataSource = PublicCode.GetMaindept(""); Store5.DataBind(); cbbDept.SelectedItem.Value = "241700000"; cbbDept.Disabled = false; } else { var dept = from d in db.Department where d.Deptnumber == SessionBox.GetUserSession().DeptNumber select new { d.Deptname, Deptid = d.Deptnumber }; Store5.DataSource = dept; Store5.DataBind(); cbbDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber; cbbDept.Disabled = true; } }