public static JariCompany GetCurrentJariCompany(User oUser) { JariCompany oCompany = new JariCompanyBL().GetById(oUser.JariCompanyId.Value); System.Web.HttpContext.Current.Session[En_UserSession.JariCompany.ToString()] = oCompany; return((JariCompany)System.Web.HttpContext.Current.Session[En_UserSession.JariCompany.ToString()]); }
public PartialViewResult Manage(int id = 0) { JariCompany oJariCompany = new JariCompany(); if (id > 0) { oJariCompany = new JariCompanyBL().GetById(id); } return(PartialView("_Manage", oJariCompany)); }
public JsonResult Delete(int id = 0) { try { bool Result = new JariCompanyBL().Delete(id); if (Result == true) { return(Json(new { success = true, message = CommonMsg.Success(EntityNames.Company, En_CRUD.Delete) })); } else { return(Json(new { success = false, message = CommonMsg.DependancyError() })); } } catch (Exception ex) { return(Json(new { success = false, message = CommonMsg.Fail(EntityNames.Company, En_CRUD.Delete) })); } }