コード例 #1
0
ファイル: BUSStaff.cs プロジェクト: OOAD-2015/Hotel-Manager
 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;
     }
 }
コード例 #2
0
 public frmDialogAddNewRolePermission()
 {
     InitializeComponent();
     //
     rolePermissionBUS = new BUSRolePermission();
     //
     btnAdd.Enabled = false;
     txtRolePermissionName.Focus();
     txtRolePermissionId.Text = "CV00000***";
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #5
0
ファイル: BUSStaff.cs プロジェクト: OOAD-2015/Hotel-Manager
        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;
            }
        }
コード例 #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);
 }