public ActionResult SetShare(long PartnerID, int PartnerShare) { var sig = UtilityClass.GetUserSession(UtilityClass.UserSession.UserSessions); var Orgdoc = UtilityClass.GetOrgDocIdSession(UtilityClass.UserSession.OrgDocId); if (sig != null) { string message = string.Empty, status = string.Empty; try { MdlPartner Pmodel = new MdlPartner(); MngPartner mobj = new MngPartner(); Pmodel.EnterByUser_ID = sig.UserID; Pmodel.OrgDoc_ID = Convert.ToInt64(Orgdoc.OrgDocID.ToString()); Pmodel.PartnerID = PartnerID; Pmodel.PartnerShare = PartnerShare; mobj.SetPartnerShare(Pmodel); message = BusinessLayer.MdlClasses.UtilityClass.UtilityMessages.updatemessage.ToString(); status = BusinessLayer.MdlClasses.UtilityClass.Enums.ErrorClass.success.ToString(); } catch (Exception ex) { message = BusinessLayer.MdlClasses.UtilityClass.UtilityMessages.errormessage.ToString(); status = BusinessLayer.MdlClasses.UtilityClass.Enums.ErrorClass.error.ToString(); } return(Json(new { status = status.ToString(), message = message.ToString() })); } else { return(RedirectToAction("Index", "Login")); } }
public ActionResult ActivateGoverningBody(long ID) { // var sig = UtilityClass.GetSession(UserSession.ESSSession); if (sig != null) { string message = string.Empty, status = string.Empty; try { MdlPartner Pmodel = new MdlPartner(); MngPartner mobj = new MngPartner(); Pmodel.EnterByUser_ID = sig.UserID; Pmodel.PartnerID = Convert.ToInt64(ID.ToString()); Pmodel.IsActive = true; mobj.DeactivateGoverningBody(Pmodel); // UtilityClass.AddPartnerSession(UtilityClass.UserSession.OrgIdforpartner, Pmodel); message = BusinessLayer.MdlClasses.UtilityClass.UtilityMessages.updatemessage.ToString(); status = BusinessLayer.MdlClasses.UtilityClass.Enums.ErrorClass.success.ToString(); } catch (Exception ex) { message = BusinessLayer.MdlClasses.UtilityClass.UtilityMessages.errormessage.ToString(); status = BusinessLayer.MdlClasses.UtilityClass.Enums.ErrorClass.error.ToString(); } return(Json(new { status = status.ToString(), message = message.ToString() })); } else { return(RedirectToAction("Index", "Login")); } }