예제 #1
0
 public ClientVisitSaveDataModel()
 {
     OldClientInfo           = new ClientVersionEditModel(EntityType.Old);
     NewClientInfo           = new ClientVersionEditModel(EntityType.New);
     OldDocument             = new DocumentModel(DocumentType.Old);
     NewDocument             = new DocumentModel(DocumentType.New);
     NewForeignDocument      = new DocumentModel(DocumentType.NewForeign);
     OldForeignDocument      = new DocumentModel(DocumentType.OldForeign);
     LivingAddress           = new AddressModel(AddressType.Living);
     RegistrationAddress     = new AddressModel(AddressType.Registration);
     validator               = new ClientVisitSaveDataValidator();
     StatusId                = 1;
     Statuses                = ReferencesProvider.GetReferences(Constants.ClientVisitStatusRef, "1", false);
     DeliveryCenters         = ReferencesProvider.GetReferences(Constants.DeliveryCenterForOperatorRef, null, false);
     Scenaries               = ReferencesProvider.GetReferences(Constants.ScenarioRef, null, DateTime.Now, null, true);
     DeliveryPoints          = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, DateTime.Now, null, true);
     GoznakTypes             = ReferencesProvider.GetReferences(Constants.GOZNAKTypeRef, null, true);
     UralsibClientCategories = ReferencesProvider.GetReferences(Constants.UralsibClientCategoryRef, null, true);
     AttachmentTypes         = ReferencesProvider.GetReferences(Constants.PolicyAttachmentTypeRef, null, true);
     MedicalCenters          = ReferencesProvider.GetReferences(Constants.MedicalCenterRef, null, true);
     Carriers                = ReferencesProvider.GetReferences(Constants.CarriersRef, null, true);
     ApplicationMethods      = ReferencesProvider.GetReferences(Constants.ApplicationMethodRef, null, true);
     Representative          = new RepresentativeEditModel()
     {
         RepresentativeTypeId = 1
     };
     ListClientAcquisitionEmployee = ReferencesProvider.GetListClientAcquisitionEmployee(null, true);
 }
예제 #2
0
 public UploadRegionExcelModel()
 {
     Regions  = ReferencesProvider.GetReferences(Constants.UralsibRegionsRef, null, true);
     Messages = new List <string>();
     //disabled Moscow
     Regions[Regions.FindIndex(a => a.Value == ((long)ListRegionId.Moscow).ToString())].Disabled = true;
 }
예제 #3
0
 public StatusReportModel()
 {
     StatusDateFrom      = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
     StatusDateTo        = DateTime.Now;
     ClientVisitStatuses = ReferencesProvider.GetReferences(Constants.ClientVisitStatusRef, null, false);
     StatusIds           = new List <long>();
 }
예제 #4
0
 public SNILSReportModel()
 {
     DateSnilsFrom    = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
     DateSnilsTo      = DateTime.Now;
     DeliveryPoints   = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, false);
     DeliveryPointIds = new List <long>();
 }
예제 #5
0
 public ClientVisitSaveDataModel(User user) : this()
 {
     TemporaryPolicyDate           = DateTime.Now;
     StatusEnabled                 = user.Roles.Contains(Role.Administrator) || user.Roles.Contains(Role.OperatorSG);
     TemporaryPolicyExpirationDate = DateTime.Now.AddWorkingDays(30);
     SignatureFileName             = Guid.NewGuid().ToString();
     PhotoFileName                 = Guid.NewGuid().ToString();
     OldClientInfo                 = new ClientVersionEditModel(EntityType.Old);
     NewClientInfo                 = new ClientVersionEditModel(EntityType.New);
     OldDocument                   = new DocumentModel(DocumentType.Old);
     NewDocument                   = new DocumentModel(DocumentType.New);
     NewForeignDocument            = new DocumentModel(DocumentType.NewForeign);
     OldForeignDocument            = new DocumentModel(DocumentType.OldForeign);
     LivingAddress                 = new AddressModel(AddressType.Living);
     RegistrationAddress           = new AddressModel(AddressType.Registration);
     OldPolicy                     = new PolicyInfoClientVisitSaveModel();
     NewPolicy                     = new PolicyInfoClientVisitSaveModel();
     Registrator                   = new UserModel();
     ClientCategoryId              = 5;
     Scenaries                     = ReferencesProvider.GetReferences(Constants.ScenarioRef, user.Roles, DateTime.Now, null, true);
     DeliveryPoints                = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, user.Roles, DateTime.Now, null, true);
     DeliveryCenters               = ReferencesProvider.GetReferences(Constants.DeliveryCenterRef, user.Roles, null, null, true);
     IsGoznakBlockVisible          = user.Roles.Contains(Role.Administrator) || user.Roles.Contains(Role.OperatorSG);
     IsActualEnabled               = (user.Roles.Contains(Role.Administrator) || user.Roles.Contains(Role.OperatorSG));
     UralsibClientCategories       = ReferencesProvider.GetReferences(Constants.UralsibClientCategoryRef, user.Roles, null, "4", true);
     ListClientAcquisitionEmployee = ReferencesProvider.GetListClientAcquisitionEmployee(null, true);
 }
예제 #6
0
 public BSOReportForm10Model()
 {
     DateForm10From   = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
     DateForm10To     = DateTime.Now;
     DeliveryPoints   = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, false);
     DeliveryPointIds = new List <long>();
 }
예제 #7
0
 public ClientVersionEditModel()
 {
     validator        = new ClientVersionValidator();
     CodFioClassifier = ReferencesProvider.GetReferences(Constants.CodFioClassifier, " ", false);
     Citizenships     = ReferencesProvider.GetReferences(Constants.CitizenshipRef, null, true);
     Categories       = ReferencesProvider.GetReferences(Constants.ClientCategoryRef, null, true);
 }
예제 #8
0
        public SmsTemplateModel GetSmsTemplate(SmsTemplate sms)
        {
            if (sms != null)
            {
                this.SenderId   = sms.SenderId;
                this.Phone      = sms.Phone;
                this.Message    = sms.Message;
                this.CreateDate = sms.CreateDate;
                this.Result     = sms.Result;
                this.StatusId   = sms.StatusId;
                this.Statuses   = ReferencesProvider.GetReferences(Constants.ClientVisitStatusRef, null, true);
            }
            else
            {
                this.SenderId   = "";
                this.Phone      = "";
                this.Message    = "";
                this.CreateDate = null;
                this.Result     = "";
                this.StatusId   = 9;
                this.Statuses   = ReferencesProvider.GetReferences(Constants.ClientVisitStatusRef, null, true);
            }

            return(this);
        }
예제 #9
0
 public UserEditModel()
 {
     Departments    = ReferencesProvider.GetReferences(Constants.DeliveryCenterRef, null, true);
     DeliveryPoints = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, true);
     RolesList      = ReferencesProvider.GetRoles();
     Roles          = new List <long>();
 }
예제 #10
0
 public BaseCheckFileHistoryModel()
 {
     ListFundFileHistoryModel = new List <FundFileHistoryModel>();
     Search       = new SearchCheckFileHistoryModel();
     listStatuses = ReferencesProvider.GetReferences(Constants.FundFileHistoryStatusRef, null, true);
     listUsers    = ReferencesProvider.GetUsers(null, true);
     PageSize     = 100;
 }
예제 #11
0
 public ClientVisitListModel()
 {
     this.SearchCriteriaModel = new ClientVisitSearchCriteriaModel();
     DeliveryCenters          = ReferencesProvider.GetReferences(Constants.DeliveryCenterRef, null, false);
     DeliveryPoints           = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, false);
     ClientVisitStatuses      = ReferencesProvider.GetReferences(Constants.ClientVisitStatusRef, null, false);
     Scenaries = ReferencesProvider.GetReferences(Constants.ScenarioRef, null, false);
     UserS     = ReferencesProvider.GetUsers(null, true);
 }
예제 #12
0
 public BSOListModel()
 {
     this.SearchCriteriaModel = new BSOSearchCriteriaModel();
     DeliveryCenters          = ReferencesProvider.GetReferences(Constants.DeliveryCenterForOperatorRef, null, false);
     DeliveryPoints           = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, true);
     listBSOStatuses          = StatusBSOProvider.GetBSOListStatus(true);
     listBSOStatusesAvailable = StatusBSOProvider.GetAvailableBSOStatus(null, true);
     listBSOResponsibles      = StatusBSOProvider.GetListBSOResponsibles(true);
 }
예제 #13
0
 public AllocationBSOModel()
 {
     AllocationBSODateFrom = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
     AllocationBSODateTo   = DateTime.Now;
     DeliveryCenters       = ReferencesProvider.GetReferences(Constants.DeliveryCenterRef, null, false);
     DeliveryPoints        = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, false);
     DeliveryCenterIds     = new List <long>();
     DeliveryPointIds      = new List <long>();
 }
예제 #14
0
        protected virtual void FillReferences(
            string referenceName,
            string selectedValue  = null,
            bool withDefaultEmpty = false)
        {
            List <SelectListItem> items = ReferencesProvider.GetReferences(referenceName, selectedValue, withDefaultEmpty);

            ViewData[referenceName] = items;
        }
예제 #15
0
 public BSOCreateModel()
 {
     this.StatusDate      = DateTime.Now;
     this.ChangeDate      = DateTime.Now;
     this.DeliveryCenters = ReferencesProvider.GetReferences(Constants.DeliveryCenterForOperatorRef, null, true);
     this.DeliveryPoints  = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, true);
     this.listBSOStatuses = StatusBSOProvider.GetBSOListStatus(false);
     this.GoodMessages    = new List <string>();
     this.FailMessages    = new List <string>();
 }
예제 #16
0
 public FundRequestIndexModel()
 {
     ClientVisits        = new List <ClientVisitFundInfoModel>();
     FundResponses       = new List <FundResponseModel>();
     DeliveryCenters     = ReferencesProvider.GetReferences(Constants.DeliveryCenterForOperatorRef, null, true);
     DeliveryPoints      = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, false);
     ClientVisitStatuses = ReferencesProvider.GetReferences(Constants.ClientVisitStatusRef, null, true);
     SearchCriteriaModel = new ClientVisitSearchCriteriaModel();
     ScenarioList        = ReferencesProvider.GetReferences(Constants.ScenarioRef, null, true);
     UserS = ReferencesProvider.GetUsers(null, true);
 }
예제 #17
0
 public BSOSaveDataModel(BSO bso)
 {
     this.Id = bso.Id;
     this.TemporaryPolicyNumber = bso.TemporaryPolicyNumber;
     this.PolicyPartyNumber     = bso.PolicyPartyNumber;
     this.StatusId                 = bso.Status.Id;
     this.StatusName               = bso.Status.Name;
     this.StatusDate               = bso.StatusDate;
     this.DeliveryCenterId         = bso.DeliveryCenterId;
     this.DeliveryPointId          = bso.DeliveryPointId;
     this.VisitGroupId             = bso.VisitGroupId;
     this.Comment                  = bso.Comment;
     this.UserId                   = bso.UserId;
     this.ResponsibleID            = bso.ResponsibleID;
     this.ChangeDate               = bso.ChangeDate;
     this.DeliveryCenters          = ReferencesProvider.GetReferences(Constants.DeliveryCenterForOperatorRef, null, true);
     this.DeliveryPoints           = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, true);
     this.listBSOStatuses          = StatusBSOProvider.GetBSOListStatus(false);
     this.listBSOStatusesAvailable = StatusBSOProvider.GetAvailableBSOStatus(bso.Status.Id, true);
     this.listBSOResponsibles      = StatusBSOProvider.GetListBSOResponsibles(true);
     validator = new BSOSaveDataModelValidator();
 }
 public PolicyInfoClientVisitSaveModel()
 {
     validator   = new PolicyInfoValidator();
     PolicyTypes = ReferencesProvider.GetReferences(Constants.PolicyTypeRef, null, true);
 }
예제 #19
0
 public BaseReportModel()
 {
     DateBaseReportFrom = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
     DateBaseReportTo   = DateTime.Now;
     Statuses           = ReferencesProvider.GetReferences(Constants.RefStatus, null, true);
 }
예제 #20
0
 public RepresentativeEditModel()
 {
     validator           = new RepresentativeEditModelValidator();
     RepresentativeTypes = ReferencesProvider.GetReferences(Constants.RepresentativeTypeRef, null, true);
     DocumentTypes       = ReferencesProvider.GetReferences(Constants.DocumentTypeRef, null, true);
 }
예제 #21
0
 public ReferenceChoiceModel()
 {
     ReferencesDisplayName = ReferencesProvider.GetReferencesDisplayName(true);
     References            = ReferencesProvider.GetReferences(Constants.ReferenceRef, null, true);
 }
예제 #22
0
        public ClientVisitSaveDataModel(User user, ClientVisit clientVisit)
            : this(user)
        {
            VisitId                       = clientVisit.Id;
            ClientId                      = clientVisit.ClientId;
            VisitGroupId                  = clientVisit.VisitGroupId;
            SignatureFileName             = clientVisit.SignatureFileName ?? Guid.NewGuid().ToString();
            PhotoFileName                 = clientVisit.PhotoFileName ?? Guid.NewGuid().ToString();
            DeliveryCenterId              = clientVisit.DeliveryCenter.Id;
            ScenarioId                    = clientVisit.Scenario != null ? clientVisit.Scenario.Id : new long?();
            TemporaryPolicyDate           = clientVisit.TemporaryPolicyDate;
            TemporaryPolicyNumber         = clientVisit.TemporaryPolicyNumber;
            TemporaryPolicyExpirationDate = clientVisit.TemporaryPolicyExpirationDate;
            StatusId                      = clientVisit.Status.Id;
            StatusDate                    = clientVisit.StatusDate;
            StatusEnabled                 = user.Roles.Contains(Role.Administrator) || user.Roles.Contains(Role.OperatorSG);
            DisableAll                    = clientVisit.Status.Id == ClientVisitStatuses.AnswerPending.Id &&
                                            !(user.Roles.Contains(Role.Administrator) || user.Roles.Contains(Role.OperatorSG));
            OldClientInfo           = new ClientVersionEditModel(clientVisit.OldClientInfo, EntityType.Old);
            NewClientInfo           = new ClientVersionEditModel(clientVisit.NewClientInfo, EntityType.New);
            OldDocument             = new DocumentModel(clientVisit.OldDocument, DocumentType.Old);
            NewDocument             = new DocumentModel(clientVisit.NewDocument, DocumentType.New);
            NewForeignDocument      = new DocumentModel(clientVisit.NewForeignDocument, DocumentType.NewForeign);
            OldForeignDocument      = new DocumentModel(clientVisit.OldForeignDocument, DocumentType.OldForeign);
            LivingAddress           = new AddressModel(clientVisit.LivingAddress, AddressType.Living);
            RegistrationAddress     = new AddressModel(clientVisit.RegistrationAddress, AddressType.Registration);
            RegistrationAddressDate = clientVisit.RegistrationAddressDate;
            OldPolicy                 = new PolicyInfoClientVisitSaveModel(clientVisit.OldPolicy, EntityType.Old);
            NewPolicy                 = new PolicyInfoClientVisitSaveModel(clientVisit.NewPolicy, EntityType.New);
            Registrator               = new UserModel(clientVisit.Registrator);
            Representative            = new RepresentativeEditModel(clientVisit.Representative);
            CarrierId                 = clientVisit.CarrierId;
            ApplicationMethodId       = clientVisit.ApplicationMethodId;
            Comment                   = clientVisit.Comment;
            GOZNAKDate                = clientVisit.GOZNAKDate;
            GOZNAKTypeId              = clientVisit.GOZNAKType != null ? clientVisit.GOZNAKType.Id : default(long?);
            ClientCategoryId          = clientVisit.ClientCategoryId == 0 ? new long() : clientVisit.ClientCategoryId;
            DeliveryPointId           = clientVisit.DeliveryPointId == 0 ? new long() : clientVisit.DeliveryPointId;
            ClientAcquisitionEmployee = clientVisit.ClientAcquisitionEmployee;
            ClientContacts            = clientVisit.ClientContacts;
            Phone          = clientVisit.Phone;
            Email          = clientVisit.Email;
            IssueDate      = clientVisit.IssueDate;
            UralsibCard    = clientVisit.UralsibCard;
            IsActual       = clientVisit.IsActual;
            Scenaries      = ReferencesProvider.GetReferences(Constants.ScenarioRef, user.Roles, DateTime.Now, null, true);
            DeliveryPoints = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, user.Roles, DateTime.Now, null, true);
            ListClientAcquisitionEmployee = ReferencesProvider.GetListClientAcquisitionEmployee(null, true);
            PolicyBlanc = clientVisit.PolicyBlanc;

            if (ScenarioId != 0 && !Scenaries.Exists(item => item.Value == ScenarioId.ToString()))
            {
                Scenaries.Add(ReferencesProvider.GetReferences(Constants.ScenarioRef).FirstOrDefault(item => item.Value == ScenarioId.ToString()));
            }
            if (DeliveryPointId.HasValue && !DeliveryPoints.Exists(item => item.Value == DeliveryPointId.Value.ToString()))
            {
                DeliveryPoints.Add(ReferencesProvider.GetReferences(Constants.DeliveryPointRef).FirstOrDefault(item => item.Value == DeliveryPointId.Value.ToString()));
            }
            if (ClientCategoryId.HasValue && !UralsibClientCategories.Exists(item => item.Value == ClientCategoryId.Value.ToString()))
            {
                UralsibClientCategories.Add(ReferencesProvider.GetReferences(Constants.UralsibClientCategoryRef).FirstOrDefault(item => item.Value == ClientCategoryId.Value.ToString()));
            }
            IssueDateEnabled = (user.Roles.Contains(Role.Administrator) || user.Roles.Contains(Role.OperatorSG)) ||
                               (StatusId == ClientVisitStatuses.PolicyReadyForClient.Id && user.Roles.Contains(Role.Registrator));
            IsReadyToFundSubmitRequestEnabled = user.Roles.Contains(Role.Administrator) || user.Roles.Contains(Role.OperatorSG);
            PolicyPartyNumber           = clientVisit.PolicyPartyNumber;
            FundResponseApplyingMessage = clientVisit.FundResponseApplyingMessage;
            IsReadyToFundSubmitRequest  = clientVisit.IsReadyToFundSubmitRequest;
            CreateDate       = clientVisit.CreateDate;
            UpdateDate       = clientVisit.UpdateDate;
            IsDifficultCase  = clientVisit.IsDifficultCase;
            AttachmentDate   = clientVisit.AttachmentDate;
            AttachmentTypeId = clientVisit.AttachmentType != null ? clientVisit.AttachmentType.Id : new long?();
            MedicalCentreId  = clientVisit.MedicalCentre != null ? clientVisit.MedicalCentre.Id : new long?();
        }
예제 #23
0
 //TODO не понятно зачем
 public void FillReferenceForView()
 {
     DeliveryCenters = ReferencesProvider.GetReferences(Constants.DeliveryCenterRef, null, true);
     //BSOResponsibles = StatusBSOProvider.GetListBSOResponsibles(true);
 }
예제 #24
0
 public PartyJournalModel()
 {
     DeliveryCenters = ReferencesProvider.GetReferences(Constants.DeliveryCenterRef, null, true);
     DeliveryPoints  = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, null, true);
 }
예제 #25
0
 public ClientVisitListModel(User user) : this()
 {
     IsDbfDownloadAvailable = user.Roles.Contains(Role.OperatorSG) || user.Roles.Contains(Role.Administrator);
     DeliveryCenters        = ReferencesProvider.GetReferences(Constants.DeliveryCenterRef, user.Roles, null, null, true);
     DeliveryPoints         = ReferencesProvider.GetReferences(Constants.DeliveryPointRef, user.Roles, null, null, true);
 }
예제 #26
0
 public DocumentModel()
 {
     DocumentTypes = ReferencesProvider.GetReferences(Constants.DocumentTypeRef, null, true);
     validator     = new DocumentModelValidator();
 }