Example #1
0
 public JsonResult Modify(GroupSite model)
 {
     try
     {
         if (model.Id == 0)
         {
             model.CreateDate = DateTime.Now;
             model.ModifyDate = DateTime.Now;
             groupService.InsertGroupSite(model);
         }
         else
         {
             var update = groupService.GetGroupSite(model.Id);
             update.GroupName  = model.GroupName;
             update.Flag       = model.Flag;
             update.ModifyDate = DateTime.Now;
             groupService.UpdateGroupSite(update);
         }
         groupService.Save();
         return(Json(new MessageResults {
             Status = "Success"
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception)
     {
         return(Json(new MessageResults {
             Status = "Error"
         }, JsonRequestBehavior.AllowGet));
     }
 }
Example #2
0
 public void UpdateGroupSite(GroupSite group)
 {
     unitOfWork.GroupSiteRepository.Update(group);
 }
Example #3
0
 public void DeleteGroupSite(GroupSite group)
 {
     unitOfWork.GroupSiteRepository.Delete(group);
 }
Example #4
0
 public void InsertGroupSite(GroupSite group)
 {
     unitOfWork.GroupSiteRepository.Insert(group);
 }