예제 #1
0
        public Master_Group Edit(string groupId, Master_Group model)
        {
            var dc = new eprocdbDataContext();
            var md = (from c in dc.Master_Groups where c.GroupID == groupId select c).SingleOrDefault();

            md.Description = model.Description;
            dc.SubmitChanges();
            return(model);
        }
예제 #2
0
 public ActionResult Edit(string groupId, Master_Group model)
 {
     try
     {
         IAksesGroupService svc = new AksesGroupService();
         var result             = svc.Edit(groupId, model);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         general.AddLogError("AksesGroup Edit", ex.Message, ex.StackTrace);
         return(View("~/Views/Master/AksesGroup/Index.cshtml"));
     }
 }
예제 #3
0
        public Master_Group Add(Master_Group model)
        {
            var          dc      = new eprocdbDataContext();
            Master_Group DataNew = new Master_Group();

            DataNew.ID           = model.ID;
            DataNew.GroupID      = model.GroupID;
            DataNew.Description  = model.Description;
            DataNew.CreatedBy    = model.CreatedBy;
            DataNew.CreatedDate  = model.CreatedDate;
            DataNew.DeleteStatus = model.DeleteStatus;
            DataNew.IsAdmin      = model.IsAdmin;
            dc.Master_Groups.InsertOnSubmit(DataNew);
            dc.SubmitChanges();
            return(model);
        }