Esempio n. 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***";
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 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;
 }
Esempio n. 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;
            }
        }
Esempio n. 6
0
 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);
 }