private void LoadRecord() { int iID = int.Parse(Common.Decrypt(Request.QueryString["id"], Session.SessionID)); AccessGroup clsAccessGroup = new AccessGroup(); AccessGroupDetails clsDetails = clsAccessGroup.Details(iID); clsAccessGroup.CommitAndDispose(); lblGroupID.Text = clsDetails.GroupID.ToString(); txtGroupName.Text = clsDetails.GroupName; txtRemarks.Text = clsDetails.Remarks; }
private void SaveRecord() { AccessGroup clsAccessGroup = new AccessGroup(); AccessGroupDetails clsDetails = new AccessGroupDetails(); clsDetails.GroupID = Convert.ToInt16(lblGroupID.Text); clsDetails.GroupName = txtGroupName.Text; clsDetails.Remarks = txtRemarks.Text; clsAccessGroup.Update(clsDetails); clsAccessGroup.CommitAndDispose(); }
private Int32 SaveRecord() { AccessGroup clsAccessGroup = new AccessGroup(); AccessGroupDetails clsDetails = new AccessGroupDetails(); clsDetails.GroupName = txtGroupName.Text; clsDetails.Remarks = txtRemarks.Text; int id = clsAccessGroup.Insert(clsDetails); clsAccessGroup.CommitAndDispose(); return(id); }
private Int32 SaveRecord() { AccessGroup clsAccessGroup = new AccessGroup(); AccessGroupDetails clsDetails = new AccessGroupDetails(); clsDetails.GroupName = txtGroupName.Text; clsDetails.Remarks = txtRemarks.Text; int id = clsAccessGroup.Insert(clsDetails); clsAccessGroup.CommitAndDispose(); return id; }
protected void Page_Load(object sender, System.EventArgs e) { const string defaultHeading = "Administration Files"; string stHeading = defaultHeading; const string defaultTitle = "RetailPlus System Security Administration"; SiteTitle.Title = defaultTitle; const SearchCategoryID defaultSearchIndex = SearchCategoryID.AccessGroups; SearchCategoryID SearchIndex = defaultSearchIndex; HorizontalNavBar.PageNavigatorid = HorizontalNavID.AdministrationFiles; if (Request.QueryString["task"] != null) { string task = Common.Decrypt(Request.QueryString["task"].ToString(), Session.SessionID); switch (task) { case "add": stHeading = "Create New Access Group"; SearchIndex = SearchCategoryID.AccessGroups; ctrlInsert.Visible = true; break; case "edit": stHeading = "Modify Access Group"; SearchIndex = SearchCategoryID.AccessGroups; ctrlUpdate.Visible = true; break; case "list": stHeading = "Access Group List"; SearchIndex = SearchCategoryID.AccessGroups; ctrlList.Visible = true; break; case "accessrights": Int32 iID = Convert.ToInt32(Common.Decrypt(Request.QueryString["id"], Session.SessionID)); AccessGroup clsAccessGroup = new AccessGroup(); AccessGroupDetails clsDetails = clsAccessGroup.Details(iID); clsAccessGroup.CommitAndDispose(); stHeading = "Update access rights of <b>" + clsDetails.GroupName + "</b>"; SearchIndex = SearchCategoryID.AccessGroups; ctrlAccessRights.Visible = true; break; case "details": stHeading = "Access Group Details"; SearchIndex = SearchCategoryID.AccessGroups; ctrlDetails.Visible = true; break; default: break; } LargeHeading.Text = stHeading; RightBodySectionSearch.SearchIDSelectedItem = SearchIndex; } }