Ejemplo n.º 1
0
 public ActionResult _AjaxDetailList(GridCommand command, ShiftDetailSearchModel searchModel)
 {
     string hql = selectDetailStatement + " where sd.Shift='" + searchModel.Shift + "'";
     if (searchModel.StartTime != null)
     {
         hql += " and sd.StartTime='" + searchModel.StartTime + "'";
     }
     if (searchModel.EndTime != null)
     {
         hql += " and sd.EndTime='" + searchModel.EndTime + "'";
     }
     hql += " order by Sequence";
     IList<ShiftDetail> ShiftDetailList = base.genericMgr.FindAll<ShiftDetail>(hql);
     if (ShiftDetailList.Count() < 48)
     {
         for (int i = ShiftDetailList.Count() + 1; i <= 48; i++)
         {
             var shiftDetail = new ShiftDetail { Sequence = (short)i };
             ShiftDetailList.Add(shiftDetail);
         }
     }
     TempData["Shift"] = searchModel.Shift;
     return PartialView(new GridModel<ShiftDetail>(ShiftDetailList));
 }
Ejemplo n.º 2
0
 public ActionResult _Detail(GridCommand command, ShiftDetailSearchModel searchModel)
 {
     SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
     ViewBag.PageSize = base.ProcessPageSize(48);
     return PartialView();
 }