コード例 #1
0
        //private void GetLocations()
        //{
        //    DataTable dataTable = objCOABR.GetLocations();

        //    LocationGridView.DataSource = dataTable;
        //    LocationGridView.DataBind();
        //}

        private void ApplyUserRoles()
        {
            try
            {
                UserRoleBR objUserRoleBR = new UserRoleBR();
                DataTable  dt            = objUserRoleBR.GetRoleDetailByID(Convert.ToInt32(Session["RoleID"].ToString()), 44);
                if (dt.Rows.Count > 0)
                {
                    btnSaveNew.Visible = Convert.ToBoolean(dt.Rows[0]["AllowAdd"]);
                    btnEditCOA.Visible = Convert.ToBoolean(dt.Rows[0]["AllowEdit"]);
                }
            }
            catch (Exception ex)
            {
                lblMessage.Text = ex.Message.ToString();
            }
        }
コード例 #2
0
 private void ApplyUserRoles()
 {
     try
     {
         UserRoleBR objUserRoleBR = new UserRoleBR();
         DataTable  dt            = objUserRoleBR.GetRoleDetailByID(Convert.ToInt32(Session["RoleID"].ToString()), 53);
         if (dt.Rows.Count > 0)
         {
             //btnAdd.Visible = Convert.ToBoolean(dt.Rows[0]["AllowAdd"]);
             objclsVariables.btnView   = Convert.ToBoolean(dt.Rows[0]["AllowView"]);
             objclsVariables.btnEdit   = Convert.ToBoolean(dt.Rows[0]["AllowEdit"]);
             objclsVariables.btnDelete = Convert.ToBoolean(dt.Rows[0]["AllowDelete"]);
         }
     }
     catch (Exception ex)
     {
         lblMessage.Text = ex.Message.ToString();
     }
 }