public ActionResult Delete() { try { sc.CheckSecurity(AppRoles.Admin, Session[SessionName.UserName.ToString()].ToString()); } catch { return(RedirectToAction("Login", "Home")); } ViewBag.ShowPrice = "none"; ViewBag.ShowLineItemPrice = "none"; MNGroupRequisitioner mnGrpReq = new MNGroupRequisitioner(); Int32 PGID = Convert.ToInt32(Request.QueryString["PGID"].ToString()); string ReqUserID = Request.QueryString["item.UserName"].ToString().ToUpper().Trim(); string MNPRGID = Request.QueryString["rec.MNPRGID"].ToString(); mnGrpReq.PGID = PGID; mnGrpReq.UserID = ReqUserID; Int32 result = 0; cmsMethods.RemoveSinglePermissionByRequisitioner(PGID.ToString(), ReqUserID); result = grpReqRepository.Delete(MNPRGID); VMGroupRequisitioner vmGrpReq = new VMGroupRequisitioner(); vmGrpReq = vmGrpReqRepository.GetByPGID(PGID); return(View(nameof(Index), vmGrpReq)); }
public static string InsertMNGroupRequisitioner(MNGroupRequisitioner grReq) { StringBuilder sb = new StringBuilder(); sb.Append("INSERT INTO WOW.MNRQPRJG(PGID, AU8USID, CRBY, UPBY) "); sb.Append("VALUES(" + grReq.PGID + ", "); sb.Append("'" + grReq.UserID + "', "); sb.Append("'" + grReq.CreatedBy + "', "); sb.Append("'" + grReq.UpdatedBy + "') "); return(sb.ToString()); }