public JsonResult AjaxInsertModule(int upperModuleId, string moduleName, string actionName, string controllerName, string urlname) { Modules module = new Modules(); if (upperModuleId != -1) module.UpperId = upperModuleId; module.ModuleName = moduleName; module.ActionName = actionName; module.ControllerName = controllerName; module.Url = urlname; bool result = ModuleBml.Insert(module); return Json(result, JsonRequestBehavior.AllowGet); }
public static bool Delete(Modules module) { using (FotografPaketiEntities db = new FotografPaketiEntities()) { try { db.Entry(module).State = System.Data.Entity.EntityState.Deleted; db.SaveChanges(); return true; } catch (Exception ex) { return false; throw; } } }
public static bool SoftDelete(Modules module) { using (FotografPaketiEntities db = new FotografPaketiEntities()) { try { module.DeleteStatus = true; bool result = Update(module); return result; } catch (Exception ex) { return false; throw; } } }
public static bool Insert(Modules module) { using (FotografPaketiEntities db = new FotografPaketiEntities()) { try { module.DeleteStatus = false; db.Modules.Add(module); db.SaveChanges(); return true; } catch (Exception ex) { return false; throw; } } }