コード例 #1
0
 public int AddVoidingReason()
 {
     try
     {
         user_dll = new UsersDLL();
         return(user_dll.AddVoidingReason(txtReasonDescription.Text.ToString(), Convert.ToInt32(Session["UserID"])));
     }
     catch (Exception ex)
     {
         ErrorMessage("Adding User Error:3 " + ex.Message);
         return(0);
     }
 }
コード例 #2
0
 private int UpdateVoidReason()
 {
     try
     {
         user_dll = new UsersDLL();
         return(user_dll.UpdateVoidingReason(txtReasonDescription.Text.ToString(), Convert.ToInt32(Session["UserID"]), Convert.ToInt32(hdnreasonid.Value)));
     }
     catch (Exception ex)
     {
         ErrorMessage(ex.Message);
         return(0);
     }
 }
コード例 #3
0
 public void BindPages()
 {
     try
     {
         user_dll = new UsersDLL();
         DataTable dt = user_dll.GetSystemPages();
         ddlPages.DataSource     = dt;
         ddlPages.DataTextField  = "PageName";
         ddlPages.DataValueField = "PageID";
         ddlPages.DataBind();
         ddlPages.Items.Insert(0, new ListItem("--Select--", "0"));
     }
     catch (Exception ex)
     {
         ErrorMessage("System pages dropdown binding error:2 " + ex.Message);
     }
 }
コード例 #4
0
 public void BindUserGroupDropDown()
 {
     try
     {
         user_dll = new UsersDLL();
         DataTable dt = user_dll.GetUserGroups();
         ddlUserGroup.DataSource     = dt;
         ddlUserGroup.DataTextField  = "GroupName";
         ddlUserGroup.DataValueField = "GroupID";
         ddlUserGroup.DataBind();
         ddlUserGroup.Items.Insert(0, new ListItem("--Select--", "0"));
     }
     catch (Exception ex)
     {
         ErrorMessage("User group dropdown binding error:1 " + ex.Message);
     }
 }
コード例 #5
0
 private int UpdateSystemPage()
 {
     try
     {
         Users ug = new Users();
         ug.PageID     = Convert.ToInt32(hdnpageid.Value);
         ug.PageDesc   = txtPagedesc.Text;
         ug.PageName   = txtPageName.Text;
         ug.LastUserID = Convert.ToInt32(Session["UserID"]);
         user_dll      = new UsersDLL();
         return(user_dll.UpdateSystemPage(ug));
     }
     catch (Exception ex)
     {
         ErrorMessage(ex.Message);
         return(0);
     }
 }
コード例 #6
0
 private int UpdateUserGroupDetails()
 {
     try
     {
         UserGroups ug = new UserGroups();
         ug.GroupId    = Convert.ToInt32(hdngroupid.Value);
         ug.Groupcode  = txtGroupCode.Text;
         ug.GroupName  = txtGroupName.Text;
         ug.LastUserID = Convert.ToInt32(Session["UserID"]);
         user_dll      = new UsersDLL();
         return(user_dll.UpdateUserGroup(ug));
     }
     catch (Exception ex)
     {
         ErrorMessage(ex.Message);
         return(0);
     }
 }
コード例 #7
0
 private int UpdateUserAccess()
 {
     try
     {
         Users u = new Users();
         u.UserID      = Convert.ToInt32(ddlUsers.SelectedItem.Value);
         u.AccessLevel = ddlAccessLevel.SelectedItem.Value;
         u.PageID      = Convert.ToInt32(ddlPages.SelectedItem.Value);
         u.LastUserID  = Convert.ToInt32(Session["UserID"]);
         user_dll      = new UsersDLL();
         return(user_dll.UpdateUserAccess(u));
     }
     catch (Exception ex)
     {
         ErrorMessage(ex.Message);
         return(0);
     }
 }
コード例 #8
0
 public int AddSystemPages()
 {
     try
     {
         Users ug = new Users();
         ug.PageDesc = txtPagedesc.Text;
         // ug.GroupId = Convert.ToInt32(txtGroupID.Text);
         ug.PageName    = txtPageName.Text;
         ug.CreatedByID = Convert.ToInt32(Session["UserID"]);
         ug.LastUserID  = Convert.ToInt32(Session["UserID"]);
         user_dll       = new UsersDLL();
         return(user_dll.AddSystemPage(ug));
     }
     catch (Exception ex)
     {
         ErrorMessage("Adding System pages Error:2 " + ex.Message);
         return(0);
     }
 }
コード例 #9
0
 public int AddUserGroupDetails()
 {
     try
     {
         UserGroups ug = new UserGroups();
         ug.Groupcode = txtGroupCode.Text;
         // ug.GroupId = Convert.ToInt32(txtGroupID.Text);
         ug.GroupName  = txtGroupName.Text;
         ug.CreatedBy  = Convert.ToInt32(Session["UserID"]);
         ug.LastUserID = Convert.ToInt32(Session["UserID"]);
         user_dll      = new UsersDLL();
         return(user_dll.AddUserGroup(ug));
     }
     catch (Exception ex)
     {
         ErrorMessage("Adding user group error:2 " + ex.Message);
         return(0);
     }
 }
コード例 #10
0
 public int AddUserAccess()
 {
     try
     {
         Users u = new Users();
         u.UserID      = Convert.ToInt32(ddlUsers.SelectedItem.Value);
         u.PageID      = Convert.ToInt32(ddlPages.SelectedItem.Value);
         u.AccessLevel = ddlAccessLevel.SelectedItem.Value;
         u.CreatedByID = Convert.ToInt32(Session["UserID"]);
         u.LastUserID  = Convert.ToInt32(Session["UserID"]);
         user_dll      = new UsersDLL();
         return(user_dll.AddUserAccess(u));
     }
     catch (Exception ex)
     {
         ErrorMessage("Adding user access error:3 " + ex.Message);
         return(0);
     }
 }
コード例 #11
0
 private int UpdateUserDetails()
 {
     try
     {
         Users u = new Users();
         u.UserID      = Convert.ToInt32(hdnuserid.Value);
         u.GroupID     = Convert.ToInt32(ddlUserGroup.SelectedItem.Value);
         u.LevelCode   = Convert.ToInt32(ddlLevelCode.SelectedItem.Value);
         u.UserType    = Convert.ToInt32(ddlUserType.SelectedItem.Value);
         u.CreatedByID = Convert.ToInt32(Session["UserID"]);
         u.LastUserID  = Convert.ToInt32(Session["UserID"]);
         user_dll      = new UsersDLL();
         return(user_dll.UpdateUser(u));
     }
     catch (Exception ex)
     {
         ErrorMessage(ex.Message);
         return(0);
     }
 }
コード例 #12
0
 public int AddUserDetails()
 {
     try
     {
         Users u = new Users();
         u.UserID      = Convert.ToInt32(ddlUsers.SelectedItem.Value);
         u.GroupID     = Convert.ToInt32(ddlUserGroup.SelectedItem.Value);
         u.LevelCode   = Convert.ToInt32(ddlLevelCode.SelectedItem.Value);
         u.UserType    = Convert.ToInt32(ddlUserType.SelectedItem.Value);
         u.CreatedByID = Convert.ToInt32(Session["UserID"]);
         u.LastUserID  = Convert.ToInt32(Session["UserID"]);
         user_dll      = new UsersDLL();
         return(user_dll.AddUser(u));
     }
     catch (Exception ex)
     {
         ErrorMessage("Adding User Error:3 " + ex.Message);
         return(0);
     }
 }
コード例 #13
0
 public void BindGrid()
 {
     try
     {
         user_dll = new UsersDLL();
         DataTable dt = user_dll.GetVoidingReasons();
         if (dt.Rows.Count > 0)
         {
             ViewState["VoidingReasons"] = dt;
             grvVoidReasons.DataSource   = dt;
             grvVoidReasons.DataBind();
         }
         else
         {
             ShowEmptyGrid();
         }
     }
     catch (Exception ex)
     {
         ErrorMessage("Grid binding error:1 " + ex.Message);
     }
 }
コード例 #14
0
 public void BindGrid()
 {
     try
     {
         user_dll = new UsersDLL();
         DataTable dt = user_dll.GetAllUsersAccess();
         if (dt.Rows.Count > 0)
         {
             ViewState["UserAccessData"] = dt;
             grvUserAccess.DataSource    = dt;
             grvUserAccess.DataBind();
         }
         else
         {
             ShowEmptyGrid();
         }
     }
     catch (Exception ex)
     {
         ErrorMessage("Grid Binding Error:1 " + ex.Message);
     }
 }