Esempio n. 1
0
            /// <summary>
            /// Creates new SaveData without ids
            /// </summary>
            public SaveData(ClientVisit visit)
            {
                this.ClientId                      = visit.ClientId;
                this.VisitGroupId                  = visit.VisitGroupId;
                this.ScenarioId                    = visit.Scenario != null && visit.Scenario.Id != 0 ? visit.Scenario.Id : default(long?);
                this.ApplicationMethodId           = visit.ApplicationMethodId;
                this.CarrierId                     = visit.CarrierId;
                this.DeliveryCenterId              = visit.DeliveryCenter.Id;
                this.TemporaryPolicyNumber         = visit.TemporaryPolicyNumber;
                this.TemporaryPolicyDate           = visit.TemporaryPolicyDate;
                this.TemporaryPolicyExpirationDate = visit.TemporaryPolicyExpirationDate;
                this.GOZNAKTypeId                  = visit.GOZNAKType != null && visit.GOZNAKType.Id != 0 ? visit.GOZNAKType.Id : default(long?);
                this.IssueDate                     = visit.IssueDate;
                this.InfoSource                    = visit.InfoSource;
                this.IsActual                      = visit.IsActual;
                this.ArchivationDate               = visit.ArchivationDate;
                this.DeregistrationDate            = visit.DeregistrationDate;
                this.AttachmentDate                = visit.AttachmentDate;
                this.AttachmentTypeId              = visit.AttachmentType != null && visit.AttachmentType.Id != 0 ? visit.AttachmentType.Id : new long?();
                this.MedicalCentreId               = visit.MedicalCentre != null && visit.MedicalCentre.Id != 0 ? visit.MedicalCentre.Id : new long?();
                this.RegistratorId                 = visit.Registrator.Id;
                this.Comment                   = visit.Comment;
                this.GOZNAKDate                = visit.GOZNAKDate;
                this.ClientCategoryId          = visit.ClientCategoryId;
                this.DeliveryPointId           = visit.DeliveryPointId;
                this.ClientAcquisitionEmployee = visit.ClientAcquisitionEmployee;
                this.ClientContacts            = visit.ClientContacts;
                this.Email                   = visit.Email;
                this.Phone                   = visit.Phone;
                this.SignatureFileName       = visit.SignatureFileName;
                this.PhotoFileName           = visit.PhotoFileName;
                this.UralsibCard             = visit.UralsibCard;
                this.RegistrationAddressDate = visit.RegistrationAddressDate;
                this.PolicyPartyNumber       = visit.PolicyPartyNumber;

                this.OldClientInfo = new ClientVersion.SaveData(visit.OldClientInfo);
                this.NewClientInfo = new ClientVersion.SaveData(visit.NewClientInfo);

                this.NewDocument        = new Document.SaveData(visit.NewDocument);
                this.OldDocument        = new Document.SaveData(visit.OldDocument);
                this.NewForeignDocument = new Document.SaveData(visit.NewForeignDocument);
                this.OldForeignDocument = new Document.SaveData(visit.OldForeignDocument);

                this.LivingAddress       = new Address.SaveData(visit.LivingAddress);
                this.RegistrationAddress = new Address.SaveData(visit.RegistrationAddress);

                this.OldPolicy      = new PolicyInfo.SaveData(visit.OldPolicy);
                this.NewPolicy      = new PolicyInfo.SaveData(visit.NewPolicy);
                this.Representative = new Representative.SaveData(visit.Representative);

                this.IsDifficultCase = visit.IsDifficultCase;
            }
Esempio n. 2
0
 public UpdateResultData(UpdateData data, bool isSuccess, string message, ClientVisit visit = null)
 {
     UnifiedPolicyNumber = data.UnifiedPolicyNumber;
     Lastname            = data.Lastname;
     Firstname           = data.Firstname;
     Secondname          = data.Secondname;
     Sex       = data.Sex;
     Birthday  = data.Birthday;
     IsSuccess = isSuccess;
     Message   = message;
     if (visit != null)
     {
         Id                 = visit.Id;
         ClientId           = visit.ClientId;
         ClientVisitGroupId = visit.VisitGroupId;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Build data to update
 /// </summary>
 /// <param name="visit"></param>
 /// <returns></returns>
 public static ClientVisit.SaveData BuildSaveData(ClientVisit visit)
 {
     ClientVisit.SaveData data = new ClientVisit.SaveData(visit);
     data.Status                     = visit.Status.Id;
     data.StatusDate                 = visit.StatusDate;
     data.IssueDate                  = visit.IssueDate;
     data.Id                         = visit.Id;
     data.VisitGroupId               = visit.VisitGroupId;
     data.OldClientInfo.Id           = visit.OldClientInfo.Id;
     data.NewClientInfo.Id           = visit.NewClientInfo.Id;
     data.OldDocument.Id             = visit.OldDocument.Id;
     data.NewDocument.Id             = visit.NewDocument.Id;
     data.NewForeignDocument.Id      = visit.NewForeignDocument.Id;
     data.OldForeignDocument.Id      = visit.OldForeignDocument.Id;
     data.LivingAddress.Id           = visit.LivingAddress.Id;
     data.RegistrationAddress.Id     = visit.RegistrationAddress.Id;
     data.OldPolicy.Id               = visit.OldPolicy.Id;
     data.NewPolicy.Id               = visit.NewPolicy.Id;
     data.Representative.Id          = visit.Representative.Id;
     data.IsActual                   = visit.IsActual;
     data.IsReadyToFundSubmitRequest = visit.IsReadyToFundSubmitRequest;
     data.IsDifficultCase            = visit.IsDifficultCase;
     return(data);
 }