Example #1
0
        private void doItem(LetterItemsPermissionEntity entity, string fld, Control item)
        {
            bool b = false;

            if (entity.get(fld).ToString().Length <= 0)
            {
                b = false;
            }
            else
            {
                b = bool.Parse(entity.get(fld).ToString());
            }
            if (b)
            {
                checkItem(item);
            }
            else
            {
                UncheckItem(item);
            }
        }
Example #2
0
        private void doPermision()
        {
            //permision
            if (UsersBS.ADMIN.ToString().Equals(UsersBS.loginedUser.get(UsersEntity.FIELD_USER_TYPE).ToString()))
            {
                return;
            }
            int userid = int.Parse(UsersBS.loginedUser.get(UsersEntity.FIELD_ID).ToString());

            LetterItemsPermissionBL     letItemPerm = new LetterItemsPermissionBL();
            LetterItemsPermissionEntity entity      = letItemPerm.getByUser(userid);

            doPerm(btnDelete, entity.get(LetterItemsPermissionEntity.FIELD_DELETE_LETTER));
        }
Example #3
0
        public void load()
        {
            _letterItemPermBL = new LetterItemsPermissionBL();
            LetterItemsPermissionEntity entity = _letterItemPermBL.getByUser(_userid);

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

            doItem(entity, LetterItemsPermissionEntity.FIELD_RECIEVEDLETTERNUMBER, txtRecievedLetterNumber);
            doItem(entity, LetterItemsPermissionEntity.FIELD_RECIEVEDLETTERNUMBER, txtRecievedLetterDate);
            doItem(entity, LetterItemsPermissionEntity.FIELD_LETTER_SUBJECT, txtLetterSubject);
            doItem(entity, LetterItemsPermissionEntity.FIELD_INPUT_REGISTER_NUMBER, txtInputRegisterNumber);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_SEARCH, btnSearch);
            doItem(entity, LetterItemsPermissionEntity.FIELD_LETTER_SUMMARY, txtSummary);
            doItem(entity, LetterItemsPermissionEntity.FIELD_INSURANCE_TYPE_ID, cmbInsuranceType);
            doItem(entity, LetterItemsPermissionEntity.FIELD_MANAGEMENT_ACTION, cmbManagemtAction);
            doItem(entity, LetterItemsPermissionEntity.FIELD_INSURANCE_DATE, txtInsuranceDate);
            doItem(entity, LetterItemsPermissionEntity.FIELD_INSURANCE_NUMBER, txtInsuranceNumber);
            doItem(entity, LetterItemsPermissionEntity.FIELD_COMPANY_ID, cmbCompanyId);
            doItem(entity, LetterItemsPermissionEntity.FIELD_LETTER_STATE_ID, cmbLetterStateId);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_LETTER_STATE, btnLetterState);
            doItem(entity, LetterItemsPermissionEntity.FIELD_REFERENCED_USER_ID, cmbReferenceUserId);
            doItem(entity, LetterItemsPermissionEntity.FIELD_ARCHIVE, cbCbArchive);
            doItem(entity, LetterItemsPermissionEntity.FIELD_FINAL_CONFIRM, cbCbFinalConfirm);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_USERS_REPLIES, btnUsersReplies);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_REFER_TO_MASTER, btnReferToMasterUSer);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_SHOW_REFFRENCES, btnShowRefrences);
            doItem(entity, LetterItemsPermissionEntity.FIELD_ALARM_STARTDATE, txtRefferDate);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_AGENT, btnAgent);
            doItem(entity, LetterItemsPermissionEntity.FIELD_DELETE_LETTER, btnDelete);
            doItem(entity, LetterItemsPermissionEntity.FIELD_FASTACTION, cbCbFastAction);

            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_DO_CHANING_TO_RECIEVE, btnDoChainingToRecive);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_DO_CHANING_TO_SEND, btnDoChainingToSend);
            doItem(entity, LetterItemsPermissionEntity.FIELD_BTN_SEPERATE_CHANING, btnSeperateFromChain);
            doItem(entity, LetterItemsPermissionEntity.FIELD_INSURANCE_COMPANY, cmbInsuranceCompany);
        }