コード例 #1
0
 public ClientVersion.SaveData GetForBLL()
 {
     ClientVersion.SaveData data = new ClientVersion.SaveData()
     {
         Id               = this.Id,
         Birthday         = this.Birthday,
         Birthplace       = this.Birthplace,
         Category         = this.Category == 0 ? new long?() : this.Category,
         Citizenship      = this.Citizenship == 0 ? new long?() : this.Citizenship,
         Firstname        = this.Firstname,
         Lastname         = this.Lastname,
         Secondname       = this.Secondname,
         FirstnameTypeId  = this.FirstnameTypeId == 0 ? new long?() : this.FirstnameTypeId,
         LastnameTypeId   = this.LastnameTypeId == 0 ? new long?() : this.LastnameTypeId,
         SecondnameTypeId = this.SecondnameTypeId == 0 ? new long?() : this.SecondnameTypeId,
         Sex              = !string.IsNullOrEmpty(this.Sex) && this.Sex.Length > 0 ? this.Sex[0] : new char?(),
         SNILS            = this.SNILS
     };
     return(data);
 }
コード例 #2
0
ファイル: ClientGenerator.cs プロジェクト: openzones/OMI
        public static ClientVersion.SaveData GetClientVersionSaveData(
            string firstname,
            string secondname,
            string lastname,
            string sex)
        {
            ClientVersion.SaveData data = new ClientVersion.SaveData();
            data.Firstname  = firstname;
            data.Secondname = secondname;
            data.Lastname   = lastname;
            List <ReferenceItem> refs = referenceBll.GetReferencesList(Constants.CodFioClassifier);

            data.FirstnameTypeId  = refs.FirstOrDefault().Id;
            data.SecondnameTypeId = refs.FirstOrDefault().Id;
            data.LastnameTypeId   = refs.FirstOrDefault().Id;
            data.Birthday         = DateTime.Now.AddYears(-50);
            data.Birthplace       = "Birthplace";
            data.SNILS            = "123-456-789 64";
            data.Sex         = sex[0];
            data.Citizenship = referenceBll.GetReferencesList(Constants.CitizenshipRef).FirstOrDefault().Id;
            data.Category    = referenceBll.GetReferencesList(Constants.ClientCategoryRef).FirstOrDefault().Id;
            return(data);
        }
コード例 #3
0
 public static void AddRowToClientVersionTable(DataTable table, long?clientId, ClientVersion.SaveData data)
 {
     AddClientVersion(table, data.Id, data.Firstname,
                      data.Secondname, data.Lastname, data.FirstnameTypeId, data.SecondnameTypeId, data.LastnameTypeId, data.Birthday,
                      data.Sex, data.SNILS, data.Citizenship, data.Birthplace, data.Category);
 }