Exemplo n.º 1
0
        public void load()
        {
            _chequeFieldsPermBL = new ChequeFieldsPermissionBL();
            ChequeFieldsPermissionEntity entity = _chequeFieldsPermBL.getByUser(_userid);

            if (entity.Tables[entity.FilledTableName].Rows.Count <= 0)
            {
                setAllUnchecked();
                return;
            }
            _tableIndex = int.Parse(entity.get(ChequeFieldsPermissionEntity.FIELD_ID).ToString());

            doItem(entity, ChequeFieldsPermissionEntity.FIELD_PAYTYPE, cmbPayType, cbcmbPayType);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_CHEQUENUMBER, txtChequeNumber, cbtxtChequeNumber);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_MATURITYDATE, txtMaturityDate, cbtxtMaturityDate);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_ENTRYDATE, txtEntryDate, cbtxtEntryDate);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_BANKID, cmbBankId, cbcmbBankId);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_PRICE, txtPrice, cbtxtPrice);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_ACCOUNTNUMBER, txtAccountNumber, cbtxtAccountNumber);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_COMPANYID, txtCompany, cbtxtCompany);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_REFFERFROM, cmbReferenceUserId, cbcmbReferenceUserId);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_REFFERDATE, txtRefferDate, cbtxtRefferDate);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_INSURANCECOMPANY, cmbInsuranceCompany, cbcmbInsuranceCompany);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_INSURANCENUMBER, txtInsuranceNumber, cbtxtInsuranceNumber);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_ACCOUNTHOLDERNAME, txtAccountHolderName, cbtxtAccountHolderName);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_ARCHIVE, cbArchive, cbcbArchive);
            doItem(entity, ChequeFieldsPermissionEntity.FIELD_CHEQUEITEMS, null, cbdataGridView1);
        }
Exemplo n.º 2
0
        private void setPermision()
        {
            int userid = int.Parse(UsersBS.loginedUser.get(UsersEntity.FIELD_ID).ToString());
            ChequeFieldsPermissionBL     chqFieldsPermBL    = new ChequeFieldsPermissionBL();
            ChequeFieldsPermissionEntity m_permissionEntity = chqFieldsPermBL.getByUser(userid);

            if (UsersBS.ADMIN.ToString().Equals(UsersBS.loginedUser.get(UsersEntity.FIELD_USER_TYPE).ToString()))
            {
                return;
            }

            doPerm(cmbPayType, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_PAYTYPE));
            doPerm(txtChequeNumber, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_CHEQUENUMBER));
            doPerm(txtMaturityDate, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_MATURITYDATE));
            doPerm(txtEntryDate, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_ENTRYDATE));
            doPerm(cmbBankId, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_BANKID));
            doPerm(txtPrice, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_PRICE));
            doPerm(txtAccountNumber, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_ACCOUNTNUMBER));
            doPerm(txtCompany, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_COMPANYID));
            doPerm(btnShowCompany, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_COMPANYID));
            doPerm(txtRefferDate, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_REFFERDATE));
            doPerm(cmbReferenceUserId, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_REFFERFROM));
            doPerm(cmbInsuranceCompany, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_INSURANCECOMPANY));
            doPerm(txtInsuranceNumber, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_INSURANCENUMBER));
            doPerm(txtAccountHolderName, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_ACCOUNTHOLDERNAME));
            doPerm(tblReply, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_CHEQUEITEMS));
            doPerm(cbArchive, m_permissionEntity.get(ChequeFieldsPermissionEntity.FIELD_ARCHIVE));
        }