示例#1
0
        public ActionResult DeleteNightBan(FormCollection fc)
        {
            string[] ids    = fc["nbid"].Split(',');
            var      result = NightBanBLL.DeleteNightBan(ids);

            base.DoLog(OperationTypeEnum.Delete, result, fc["nbid"]);
            return(Json(result));
        }
示例#2
0
        public ActionResult GetNightBanInfo(NightBanSearchModel model, int searchPage)
        {
            SearchDataWithPagedDatas <NightBanSearchModel, NightBanListModel> result =
                new SearchDataWithPagedDatas <NightBanSearchModel, NightBanListModel>();

            result.SearchModel = model;
            result.PagedDatas  = NightBanBLL.GetPagedNightBan(model, searchPage, this.PageSize);
            return(PartialView("_NightBanPagedGrid", result));
        }
示例#3
0
        public ActionResult EditNightBan(int id)
        {
            var result = NightBanBLL.GetNightBanByID(id);

            if (result.DataResult == null)
            {
                return(Content(result.Message));
            }
            return(PartialView("_EditNightBan", result.DataResult));
        }
示例#4
0
        public ActionResult NightBanSetting()
        {
            SearchDataWithPagedDatas <NightBanSearchModel, NightBanListModel> model =
                new SearchDataWithPagedDatas <NightBanSearchModel, NightBanListModel>();

            model.SearchModel           = new NightBanSearchModel();
            model.SearchModel.IsEnabled = -1;

            model.PagedDatas = NightBanBLL.GetPagedNightBan(model.SearchModel, 1, this.PageSize);
            return(PartialView("_NightBanSetting", model));
        }
示例#5
0
 public ActionResult EditNightBan(NightBanEditModel model)
 {
     if (ModelState.IsValid)
     {
         model.UpdateUserID = base.UserIDForLog;
         var result = NightBanBLL.EditNightBan(model);
         base.DoLog(OperationTypeEnum.Edit, result, "ID:" + model.ID);
         return(Json(result));
     }
     else
     {
         return(PartialView("_EditNightBan", model));
     }
 }
示例#6
0
 public ActionResult AddNightBan(NightBanEditModel model)
 {
     if (ModelState.IsValid)
     {
         model.CreateUserID = base.UserIDForLog;
         var result = NightBanBLL.AddNightBan(model);
         base.DoLog(OperationTypeEnum.Add, result, "NightBanName:" + model.NightBanName);
         return(Json(result));
     }
     else
     {
         return(PartialView("_AddNightBan", model));
     }
 }
示例#7
0
 public ActionResult CheckNightBanExists(string nightBanName, int id = 0)
 {
     return(Json(!NightBanBLL.CheckNightBanExists(nightBanName, id)));
 }