Пример #1
0
        public static User Build(ITypeReader reader)
        {
            User user = new User();

            user.UserId             = reader.GetGuid("UserId");
            user.AcceptedLatestTOS  = reader.GetBool("AcceptedLatestTOS");
            user.LastTOSVersion     = reader.GetInt("LastTOSVersion");
            user.PasswordExpiration = reader.GetDate("PasswordExpiration");
            user.FirstTimeUser      = reader.GetBool("NewUser");
            user.DisplayName        = reader.GetString("DisplayName");
            user.FirstName          = reader.GetString("FirstName");
            user.MiddleName         = reader.GetString("MiddleName");
            user.LastName           = reader.GetString("LastName");
            user.Phone = reader.GetString("Phone");
            user.Ext   = reader.GetString("Ext");
            user.SessionTimeoutInterval = reader.GetInt("SessionTimeout");
            user.PasswordQuestion       = reader.GetString("PasswordQuestion");
            user.PasswordAnswer         = reader.GetString("PasswordAnswer");
            user.AdminUserId            = reader.GetGuid("AdministratorUserId");
            user.AdminUserName          = reader.GetString("AdminUserName");
            user.UserType   = (UserTypes)reader.GetInt("UserTypeId");
            user.UserTypeId = reader.GetInt("UserTypeId");
            user.FailedPasswordAttemptCount       = reader.GetInt("FailedPasswordAttemptCount");
            user.FailedPasswordAnswerAttemptCount = reader.GetInt("FailedPasswordAnswerAttemptCount");
            user.Status       = reader.GetString("Status");
            user.StatusTypeId = reader.GetInt("StatusTypeId");
            return(user);
        }
Пример #2
0
        public static Patient BuildPQRSPatient(ITypeReader reader)
        {
            Patient patient = new Patient();

            patient.Name                  = reader.GetString(Columns.PATIENTNAME);
            patient.PatientId             = reader.GetInt(Columns.PATIENTID);
            patient.ClientPatientId       = reader.GetString(Columns.CLIENTPATIENTID);
            patient.Payer                 = reader.GetString(Columns.PAYER);
            patient.DateOfService         = DateTime.Parse(reader.GetString(Columns.DOS));
            patient.MedicareFeeForService = reader.GetBool(Columns.MFFS);
            patient.PatientPqriApptId     = reader.GetInt(Columns.PATIENTPQRIAPPTID);
            patient.PlaceOfService        = reader.GetBool(Columns.PLACEOFSERVICE);
            patient.PlaceOfServiceNumber  = reader.GetString(Columns.PLACEOFSERVICENUMBER);

            return(patient);
        }
Пример #3
0
        public static Control Build(ITypeReader reader)
        {
            Control control = new Control();

            control.ControlId         = reader.GetInt("ControlId");
            control.DisplayOrder      = reader.GetInt("DisplayOrder");
            control.IsTab             = reader.GetBool("IsTab");
            control.IsSubTab          = reader.GetBool("IsSubTab");
            control.IsVisible         = reader.GetBool("IsVisible");
            control.ParentControlId   = reader.GetInt("ParentControlId");
            control.Name              = reader.GetString("Name");
            control.Path              = reader.GetString("Path");
            control.Description       = reader.GetString("Description");
            control.ParentControlName = reader.GetString("ParentControlName");

            return(control);
        }
Пример #4
0
        public static OrgFunction Build(ITypeReader reader)
        {
            var orgFunction = new OrgFunction();

            orgFunction.OrgFunctionId = reader.GetInt("OrgFunctionId");
            orgFunction.Name          = reader.GetString("OrgFunctionName");
            orgFunction.Description   = reader.GetString("Description", string.Empty);
            orgFunction.IsDeleted     = reader.GetBool("DeleteFlag", false);
            return(orgFunction);
        }
Пример #5
0
        public static PageView Build(ITypeReader reader)
        {
            var pageView = new PageView
            {
                ContractId        = reader.GetInt("ContractId"),
                Name              = reader.GetString("ViewName"),
                Description       = reader.GetString("Description"),
                IsPageDefaultView = reader.GetBool("IsPageDefaultView"),
                IsUserDefaultView = reader.GetBool("IsUserDefaultView"),
                ControlId         = reader.GetInt("ControlId"),
                PageName          = reader.GetString("PageName"),
                PagePath          = reader.GetString("PagePath"),
                UserId            = reader.GetGuid("UserId"),
                ViewContainer     = reader.GetString("ViewContainer"),
                ViewId            = reader.GetInt("ViewId")
            };

            return(pageView);
        }
Пример #6
0
        public static ApplicationMessage Build(ITypeReader reader)
        {
            ApplicationMessage applicationMessage = new ApplicationMessage();

            applicationMessage.Code  = reader.GetString("Code");
            applicationMessage.Title = reader.GetString("Title");
            applicationMessage.Text  = reader.GetString("Text");
            applicationMessage.Audit = reader.GetBool("Audit");
            return(applicationMessage);
        }
Пример #7
0
        public static Group Build(ITypeReader reader)
        {
            Group group = new Group();

            group.GroupId    = reader.GetInt(Columns.GROUPID);
            group.Name       = reader.GetString(Columns.NAME);
            group.EnableAll  = reader.GetBool(Columns.ENABLEALL);
            group.CreateDate = reader.GetDate(Columns.CREATEDATE);

            return(group);
        }
Пример #8
0
        public static User BuildLightweight(ITypeReader reader)
        {
            User user = new User();

            user.UserId        = reader.GetGuid("UserId");
            user.UserName      = reader.GetString("UserName");
            user.DisplayName   = reader.GetString("DisplayName");
            user.CreateDate    = reader.GetDate("CreateDate").Value;
            user.Status        = reader.GetString("Status");
            user.StatusTypeId  = reader.GetInt("StatusTypeId");
            user.UserType      = (UserTypes)reader.GetInt("UserTypeId");
            user.UserTypeId    = reader.GetInt("UserTypeId");
            user.LastLoginDate = reader.GetDate("LastLoginDate");
            user.Email         = reader.GetString("Email");
            user.IsNewUser     = reader.GetBool("IsNewUser");

            return(user);
        }
Пример #9
0
        public static Contract Build(ITypeReader reader)
        {
            Contract contract = new Contract();

            PhytelEncrypter phytelEncrypter = new PhytelEncrypter();

            contract.ContractId       = reader.GetInt("ContractId");
            contract.Name             = reader.GetString("Name");
            contract.Number           = reader.GetString("Number");
            contract.Database         = reader.GetString("Database");
            contract.Server           = reader.GetString("Server");
            contract.DefaultContract  = reader.GetBool("DefaultContract");
            contract.UserName         = reader.GetString("UserName");
            contract.Password         = phytelEncrypter.Decrypt(reader.GetString("Password"));
            contract.ConnectionString = string.Format("Data Source={0};Initial Catalog={1};Persist Security Info=True;User ID={2};Password={3}", contract.Server, contract.Database, contract.UserName, contract.Password);
            contract.PhytelContractId = reader.GetInt("PhytelContractId");

            return(contract);
        }