コード例 #1
0
ファイル: Roles.aspx.cs プロジェクト: xapiz/COCASJOL
        protected void PrivilegiosDeRolSt_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            try
            {
                int rol_id = string.IsNullOrEmpty(this.EditIdTxt.Text) ? 0 : Convert.ToInt32(this.EditIdTxt.Text);

                RolLogic rollogic = new RolLogic();
                int priv_id = string.IsNullOrEmpty(this.f_PRIV_ID.Text) ? 0 : Convert.ToInt32(this.f_PRIV_ID.Text);
                this.PrivilegiosDeRolSt.DataSource = rollogic.GetPrivilegios(rol_id, priv_id, this.f_PRIV_NOMBRE.Text, this.f_PRIV_LLAVE.Text);
                this.PrivilegiosDeRolSt.DataBind();
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar privilegios de rol.", ex);
                throw;
            }
        }
コード例 #2
0
ファイル: Roles.aspx.cs プロジェクト: xapiz/COCASJOL
        public void EditRolDeletePrivilegioBtn_Click()
        {
            try
            {
                string loggeduser = this.LoggedUserHdn.Text;
                RolLogic rollogic = new RolLogic();

                int rol_id = Convert.ToInt32(this.EditIdTxt.Text);

                List<int> privs = new List<int>();

                foreach (SelectedRow row in this.PrivilegiosDeRolSelectionM.SelectedRows)
                {
                    privs.Add(Convert.ToInt32(row.RecordID));
                }

                rollogic.EliminarPrivilegios(rol_id, privs, loggeduser);

                this.PrivilegiosDeRolSelectionM.ClearSelections();
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al eliminar privilegios de rol.", ex);
                throw;
            }
        }