Exemple #1
0
 public DTORolePermission GetRolePermissionByPositionId(String strPositionId)
 {
     try
     {
         DTORolePermission rolePermissionObj;
         BUSRolePermission rolePermissionBUS = new BUSRolePermission();
         DataTable         tb = rolePermissionBUS.GetRolePermissionById(strPositionId);
         if (tb.Rows.Count > 0)
         {
             rolePermissionObj = new DTORolePermission();
             if (!tb.Rows[0][3].ToString().Equals(""))
             {
                 rolePermissionObj.SystemManager = Boolean.Parse(tb.Rows[0][3].ToString());
                 rolePermissionObj.ChangeRule    = Boolean.Parse(tb.Rows[0][4].ToString());
             }
         }
         else
         {
             return(null);
         }
         return(rolePermissionObj);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public frmDialogAddNewRolePermission()
 {
     InitializeComponent();
     //
     rolePermissionBUS = new BUSRolePermission();
     //
     btnAdd.Enabled = false;
     txtRolePermissionName.Focus();
     txtRolePermissionId.Text = "CV00000***";
 }
 public frmCustomer()
 {
     InitializeComponent();
     rolePermissionDataTable = new DataTable();
     rolePermissionBUS = new BUSRolePermission();
     rolePermissionObject = new DTORolePermission();
     customerDataTable = new DataTable();
     customerBUS = new BUSCustomer();
     customerObject = new DTOCustomer();
     customerMultiSelect = new GridCheckMarksSelection(grdvListCustomer);
     ruleBUS = new BUSRule();
     CustomerSno.VisibleIndex = 1;
 }
 public frmSearchStaff()
 {
     InitializeComponent();
     rolePermissionDataTable = new DataTable();
     rolePermissionBUS = new BUSRolePermission();
     rolePermissionObject = new DTORolePermission();
     _StaffDT = new DataTable();
     staffBUS = new BUSStaff();
     staffObject = new DTOStaff();
     staffMultiSelect = new GridCheckMarksSelection(grdvListStaff);
     ruleBUS = new BUSRule();
     StaffSno.VisibleIndex = 1;
 }
Exemple #5
0
        public DTORolePermission GetRolePermissionByPositionId(String strPositionId)
        {
            try
            {
                DTORolePermission rolePermissionObj;
                BUSRolePermission rolePermissionBUS = new BUSRolePermission();
                DataTable tb = rolePermissionBUS.GetRolePermissionById(strPositionId);
                if (tb.Rows.Count > 0)
                {
                    rolePermissionObj = new DTORolePermission();
                    if (!tb.Rows[0][3].ToString().Equals(""))
                    {
                        rolePermissionObj.SystemManager = Boolean.Parse(tb.Rows[0][3].ToString());
                        rolePermissionObj.ChangeRule = Boolean.Parse(tb.Rows[0][4].ToString());
                    }
                }
                else
                    return null;
                return rolePermissionObj;
            }
            catch (Exception)
            {

                throw;
            }
        }
 private void InitStaffObj()
 {
     staffBUS = new BUSStaff();
     rolePermissionDataTable = new DataTable();
     rolePermissionBUS = new BUSRolePermission();
     rolePermissionDTO = new DTORolePermission();
     rolePermissionDTO.RolePermissionID = frmHomePage.staffLogin.RolePermissionId;
     rolePermissionDTO.RolePermissionName = rolePermissionBUS.GetRolePermissionNameById(rolePermissionDTO.RolePermissionID);
 }