protected void Cell_Click(object sender, AjaxEventArgs e) { if (dfBegin.SelectedDate > dfEnd.SelectedDate) { Ext.Msg.Alert("提示", "日期选择有误!").Show(); return; } CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel; if (sm.SelectedCell.Value.Trim() == "0") { return; } if (sm.SelectedCell.Name.Trim() == "SMScount") { var data = from t in dc.TblSmsendtask from p in dc.Person where t.Destaddr == p.Tel && t.Subtime >= dfBegin.SelectedDate && t.Subtime <= dfEnd.SelectedDate && p.Maindeptid == sm.SelectedCell.RecordID.Trim() select new { t.Smsid, t.SmContent, t.Sendtime, p.Name }; DetailStore.DataSource = data.OrderByDescending(p => p.Sendtime); DetailStore.DataBind(); DetailWindow.Show(); } }
public void DetailShow() { RowSelectionModel sm = gpEdit.SelectionModel.Primary as RowSelectionModel; string perid = sm.SelectedRow.RecordID; //var data = // (from yh in dc.Nyhinput // from yc in dc.Nyinhuancheck // from y in dc.Yhbase // where yh.Yhputinid == yc.Yhputinid && yh.Yhid == y.Yhid && yc.Responsibleid == perid // select new // { // Content = y.Yhcontent, // yh.Pctime, // Kind = "yh" // }).Union( // from sw in dc.Nswinput // from s in dc.Swbase // where sw.Swid == s.Swid && sw.Swpersonid == perid // select new // { // Content = s.Swcontent, // sw.Pctime, // Kind = "sw" // }).Union( // from z in dc.Moveplan // from d in dc.Place // where z.Personid == perid && z.Placeid==d.Placeid // select new // { // Content=d.Placename+",走动情况:"+z.Movestate, // Pctime = z.Starttime, // Kind = "zd" // }).Union( // from g in dc.Workinjury // where g.Personnumber == perid // select new // { // Content=g.GsFact, // Pctime = g.Indate, // Kind = "gs" // }); //data = data.Where(p => p.Pctime >= new DateTime(System.DateTime.Today.Year, 1, 1)); DetailStore.DataSource = GetUserLoginDetail(new DateTime(System.DateTime.Today.Year, 1, 1), System.DateTime.Today, perid); DetailStore.DataBind(); DetailWindow.Show(); }
public void LoadData() { if (dfBegin.SelectedDate > dfEnd.SelectedDate) { Ext.Msg.Alert("提示", "日期选择有误!").Show(); return; } var data = from t in dc.TblSmsendtask from p in dc.Person where t.Destaddr == p.Tel && t.Subtime >= dfBegin.SelectedDate && t.Subtime <= dfEnd.SelectedDate && p.Maindeptid == SessionBox.GetUserSession().DeptNumber select new { t.Smsid, t.SmContent, t.Sendtime, p.Name }; DetailStore.DataSource = data.OrderByDescending(p => p.Sendtime); DetailStore.DataBind(); }