protected void placeTemplateStore_RefershData(object sender, StoreRefreshDataEventArgs e) { HBBLL hb = new HBBLL(); var data2 = hb.GetYPPT(SessionBox.GetUserSession().PersonNumber, SessionBox.GetUserSession().DeptNumber); this.placeTemplateStore.DataSource = data2; this.placeTemplateStore.DataBind(); UpdateStatus(); }
//[AjaxMethod] //public void PYsearch(string py, string store) //{ // // switch (store.Trim()) // { // case "perStore": // var q = from p in dc.Person // where p.Maindeptid == SessionBox.GetUserSession().DeptNumber // && (p.Pinyin + p.Name + p.Personnumber).ToLower().Contains(py.ToLower()) && p.Personstatus == 1 // select new // { // p.Personnumber, // p.Name // }; // perStore.DataSource = q; // perStore.DataBind(); // break; // case "placeStore": // var place = from pl in dc.Place // where pl.Maindeptid == SessionBox.GetUserSession().DeptNumber && pl.Placestatus == 1 // && (dc.F_PINYIN(pl.Placename) + pl.Placename).ToLower().Contains(py.ToLower()) // select new // { // pl.Placeid, // pl.Placename // }; // placeStore.DataSource = place; // placeStore.DataBind(); // break; // } //} #endregion protected void CitiesRefresh(object sender, StoreRefreshDataEventArgs e) { HBBLL hb = new HBBLL(); var data2 = hb.GetYPPT(cbbPerson.SelectedItem.Value, SessionBox.GetUserSession().DeptNumber); var pt = from r in data2 select new { Id = r.Id, Name = r.TLevel == "矿级" ? string.Format("{0}({1})", r.Name, r.TLevel) : r.Name, Level = r.TLevel }; placeTemplateStore.DataSource = pt; placeTemplateStore.DataBind(); //cboPlaceTemplate.Items.Insert(0, new Coolite.Ext.Web.ListItem("--不使用模板--", "-1")); }