Ejemplo n.º 1
0
        protected void LoadRights()
        {
            try
            {
                UserMan.Rights RightsObj = new UserMan.Rights();

                if (this.hdnRoleId.Value != string.Empty)
                {
                    RightsObj.RolesId = Convert.ToInt32(this.hdnRoleId.Value);
                }

                gvRights.DataSource = RightsObj.SelectByRolesId();
                gvRights.DataBind();

                if (this.hdnRoleId.Value != string.Empty)
                {

                    for (int i = 0; i <= gvRights.VisibleRowCount - 1; i++)
                    {
                        if (gvRights.GetRowValues(i,"RolesId").ToString() != string.Empty)
                        {
                            gvRights.Selection.SelectRow(i);
                        }
                    }

                }

            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        protected void LoadRights()
        {
            try
            {
                UserMan.Rights RightsObj = new UserMan.Rights();

                if (this.hdnRoleId.Value != string.Empty)
                {
                    RightsObj.RolesId = Convert.ToInt32(this.hdnRoleId.Value);
                }

                gvRights.DataSource = RightsObj.SelectByRolesId();
                gvRights.DataBind();

                if (this.hdnRoleId.Value != string.Empty)
                {
                    for (int i = 0; i <= gvRights.VisibleRowCount - 1; i++)
                    {
                        if (gvRights.GetRowValues(i, "RolesId").ToString() != string.Empty)
                        {
                            gvRights.Selection.SelectRow(i);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
 public DataSet SelectByRolesId(Rights rights)
 {
     Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
     DbCommand dbCommand = db.GetStoredProcCommand("usp_RightsSelectByRolesId");
     db.AddInParameter(dbCommand, "@RolesId", DbType.Int32, rights.RolesId);
     return db.ExecuteDataSet(dbCommand);
 }
Ejemplo n.º 4
0
        protected void DisplayData()
        {
            try
            {
                int           currentRoleId = Convert.ToInt32(this.hdnRoleId.Value);
                UserMan.Roles RolesObj      = new UserMan.Roles();
                RolesObj.RolesId             = currentRoleId;
                RolesObj.CompanyId           = Master.CurrentCompany.CompanyId;
                RolesObj                     = RolesObj.Select();
                this.txtRoleName.Text        = RolesObj.RoleName;
                this.txtRoleDescription.Text = RolesObj.RoleDescription;

                UserMan.Rights RightsObj = new UserMan.Rights();
                RightsObj.RolesId   = RolesObj.RolesId;
                gvRights.DataSource = RightsObj.SelectByRolesId();
                gvRights.DataBind();
            }
            catch (System.Exception)
            {
            }
        }
Ejemplo n.º 5
0
        protected void DisplayData()
        {
            try
            {

                int currentRoleId = Convert.ToInt32(this.hdnRoleId.Value);
                UserMan.Roles RolesObj = new UserMan.Roles();
                RolesObj.RolesId = currentRoleId;
                RolesObj.CompanyId = Master.CurrentCompany.CompanyId;
                RolesObj = RolesObj.Select();
                this.txtRoleName.Text = RolesObj.RoleName;
                this.txtRoleDescription.Text = RolesObj.RoleDescription;

                UserMan.Rights RightsObj = new UserMan.Rights();
                RightsObj.RolesId = RolesObj.RolesId;
                gvRights.DataSource = RightsObj.SelectByRolesId();
                gvRights.DataBind();

            }
            catch (System.Exception)
            {

            }
        }