public void ParseTest() { Assert.AreEqual(new HourMinute(09, 52), HourMinute.Parse("09:52")); Assert.AreEqual(new HourMinute(09, 52), HourMinute.Parse("09:52:51")); Assert.AreEqual(new HourMinute(09, 03), HourMinute.Parse("9:03")); Assert.AreEqual(new HourMinute(21, 03), HourMinute.Parse("21:3")); Assert.AreEqual(new HourMinute(09, 03), HourMinute.Parse("9:3")); }
private void LoadFromBatch(Guid batchRevenueConstituentID) { Guid id = Guid.Empty; using (var con = new SqlConnection(this.GetRequestContext().AppDBConnectionString())) { using (var command = con.CreateCommand()) { command.CommandText = "USP_DATAFORMTEMPLATE_VIEW_CONSTITUENTDUPLICATESEARCHRESOLUTION"; command.CommandType = CommandType.StoredProcedure; command.CommandTimeout = TIMEOUT; if (batchRevenueConstituentID != Guid.Empty) { command.Parameters.AddWithValue("@ID", (object)batchRevenueConstituentID); } else { return; } command.Parameters.Add("@NAME", SqlDbType.NVarChar, 154).Direction = ParameterDirection.Output; command.Parameters.Add("@LASTNAME", SqlDbType.NVarChar, 100).Direction = ParameterDirection.Output; command.Parameters.Add("@FIRSTNAME", SqlDbType.NVarChar, 50).Direction = ParameterDirection.Output; command.Parameters.Add("@MIDDLENAME", SqlDbType.NVarChar, 50).Direction = ParameterDirection.Output; command.Parameters.Add("@SUFFIXCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@BIRTHDATE", SqlDbType.NVarChar, 255).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESS_COUNTRYID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESS_ADDRESSBLOCK", SqlDbType.NVarChar, 150).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESS_CITY", SqlDbType.NVarChar, 50).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESS_STATEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESS_POSTCODE", SqlDbType.NVarChar, 12).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONENUMBER", SqlDbType.NVarChar, 100).Direction = ParameterDirection.Output; command.Parameters.Add("@EMAILADDRESS", SqlDbType.NVarChar, 100).Direction = ParameterDirection.Output; command.Parameters.Add("@BATCHNUMBER", SqlDbType.NVarChar, 100).Direction = ParameterDirection.Output; command.Parameters.Add("@CREATEDON", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@BATCHID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@BATCHTYPE", SqlDbType.Int).Direction = ParameterDirection.Output; command.Parameters.Add("@DATALOADED", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESS_TYPECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@TITLECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONETYPECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@EMAILADDRESSTYPECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSTYPECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@PRIMARYRECORDID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@BATCHROWID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@NAMECODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@SIMILARADDRESSCODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@UNSIMILARADDRESSCODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@NEWADDRESSPRIMARYCODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@DIFFERENTPHONECODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@NEWPHONEPRIMARYCODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@DIFFERENTEMAILCODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@NEWEMAILPRIMARYCODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@BIRTHDATERULECODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@INCOMINGADDRESSID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@INCOMINGEMAILID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@INCOMINGPHONEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@MAIDENNAME", SqlDbType.NVarChar, 100).Direction = ParameterDirection.Output; command.Parameters.Add("@NICKNAME", SqlDbType.NVarChar, 50).Direction = ParameterDirection.Output; command.Parameters.Add("@GENDERCODE", SqlDbType.TinyInt).Direction = ParameterDirection.Output; command.Parameters.Add("@DECEASED", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@DECEASEDDATE", SqlDbType.Char, 8).Direction = ParameterDirection.Output; command.Parameters.Add("@GIVESANONYMOUSLY", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@MARITALSTATUSCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@WEBADDRESS", SqlDbType.NVarChar, 2047).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSHISTORICALSTARTDATE", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSHISTORICALENDDATE", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSDONOTMAIL", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSDONOTMAILREASONCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSSTARTDATE", SqlDbType.NVarChar, 4).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSENDDATE", SqlDbType.NVarChar, 4).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSDPC", SqlDbType.NVarChar, 4000).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSCART", SqlDbType.NVarChar, 4000).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSLOT", SqlDbType.NVarChar, 5).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSINFOSOURCECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSINFOSOURCECOMMENTS", SqlDbType.NVarChar, 256).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSCOUNTYCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSREGIONCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSCONGRESSIONALDISTRICTCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSSTATEHOUSEDISTRICTCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSSTATESENATEDISTRICTCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSLOCALPRECINCTCODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSCERTIFICATIONDATA", SqlDbType.Int).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSLASTVALIDATIONATTEMPTDATE", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSOMITFROMVALIDATION", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSVALIDATIONMESSAGE", SqlDbType.NVarChar, 200).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONEDONOTCALL", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONESTARTTIME", SqlDbType.Char, 4).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONEENDTIME", SqlDbType.Char, 4).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONEINFOSOURCECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONECOUNTRYID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONESTARTDATE", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONEENDDATE", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONESEASONALSTARTDATE", SqlDbType.Char, 4).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONESEASONALENDDATE", SqlDbType.Char, 4).Direction = ParameterDirection.Output; command.Parameters.Add("@EMAILADDRESSDONOTEMAIL", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@EMAILADDRESSINFOSOURCECODEID", SqlDbType.UniqueIdentifier).Direction = ParameterDirection.Output; command.Parameters.Add("@EMAILADDRESSSTARTDATE", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@EMAILADDRESSENDDATE", SqlDbType.Date).Direction = ParameterDirection.Output; command.Parameters.Add("@NAMEFORMATS", SqlDbType.Xml).Direction = ParameterDirection.Output; command.Parameters.Add("@ADDRESSISPRIMARY", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@PHONEISPRIMARY", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@EMAILISPRIMARY", SqlDbType.Bit).Direction = ParameterDirection.Output; command.Parameters.Add("@CONSTITUENCIES", SqlDbType.Xml).Direction = ParameterDirection.Output; command.Parameters.Add("@ORIGINAL_KEYNAME", SqlDbType.NVarChar, 100).Direction = ParameterDirection.Output; command.Parameters.Add("@ORIGINAL_FIRSTNAME", SqlDbType.NVarChar, 50).Direction = ParameterDirection.Output; con.Open(); command.ExecuteNonQuery(); this._customModel.RecordId = this.erbConstituentID.ToString(); this._customModel.LASTNAME.Value = command.Parameters["@LASTNAME"].Value.ToString(); this._customModel.FIRSTNAME.Value = command.Parameters["@FIRSTNAME"].Value.ToString(); this._customModel.MIDDLENAME.Value = command.Parameters["@MIDDLENAME"].Value.ToString(); this._customModel.NAME.Value = "Incoming constituent data"; _customModel.BATCHCREATEDTEXT.Value = string.Format("Batch: {0}; Created: {1}", command.Parameters["@BATCHNUMBER"].Value.ToString(), DateTime.Parse(command.Parameters["@CREATEDON"].Value.ToString()).ToShortDateString()); if (!string.IsNullOrEmpty(command.Parameters["@SUFFIXCODEID"].Value.ToString())) { this._customModel.SUFFIXCODEID.Value = Guid.Parse(command.Parameters["@SUFFIXCODEID"].Value.ToString()); } if (this._customModel.SUFFIXCODEID.HasValue()) { _customModel.SUFFIX.Value = this._customModel.SUFFIXCODEID.GetDescription(); } else { _customModel.SUFFIX.Value = string.Empty; } if (!string.IsNullOrEmpty(command.Parameters["@TITLECODEID"].Value.ToString())) { this._customModel.TITLECODEID.Value = Guid.Parse(command.Parameters["@TITLECODEID"].Value.ToString()); } if (this._customModel.TITLECODEID.HasValue()) { _customModel.TITLE.Value = _customModel.TITLECODEID.GetDescription(); } else { _customModel.TITLE.Value = string.Empty; } if (command.Parameters["@BIRTHDATE"].Value.ToString() != "00000000") { _customModel.BIRTHDATE.Value = FuzzyDate.Parse(command.Parameters["@BIRTHDATE"].Value.ToString()); } _customModel.ADDRESS_ADDRESSBLOCK.Value = command.Parameters["@ADDRESS_ADDRESSBLOCK"].Value.ToString(); if (!string.IsNullOrEmpty(command.Parameters["@ADDRESS_TYPECODEID"].Value.ToString())) { this._customModel.ADDRESS_ADDRESSTYPECODEID.Value = Guid.Parse(command.Parameters["@ADDRESS_TYPECODEID"].Value.ToString()); this._customModel.ADDRESS_ADDRESSTYPE.Value = this._customModel.ADDRESS_ADDRESSTYPECODEID.GetDescription(); } this._customModel.ADDRESS_CITY.Value = command.Parameters["@ADDRESS_CITY"].Value.ToString(); if (!string.IsNullOrEmpty(command.Parameters["@ADDRESS_STATEID"].Value.ToString())) { this._customModel.ADDRESS_STATEID.Value = Guid.Parse(command.Parameters["@ADDRESS_STATEID"].Value.ToString()); } if (this._customModel.ADDRESS_STATEID.HasValue()) { _customModel.ADDRESS_STATE.Value = this._customModel.ADDRESS_STATEID.GetCurrentDescription(); } else { _customModel.ADDRESS_STATE.Value = string.Empty; } this._customModel.ADDRESS_POSTCODE.Value = command.Parameters["@ADDRESS_POSTCODE"].Value.ToString(); if (!string.IsNullOrEmpty(command.Parameters["@PHONETYPECODEID"].Value.ToString())) { this._customModel.PHONETYPECODEID.Value = Guid.Parse(command.Parameters["@PHONETYPECODEID"].Value.ToString()); } if (this._customModel.PHONETYPECODEID.HasValue()) { _customModel.PHONETYPE.Value = command.Parameters["@PHONETYPE"].Value.ToString(); } _customModel.PHONENUMBER.Value = command.Parameters["@PHONENUMBER"].Value.ToString(); _customModel.EMAILADDRESS.Value = command.Parameters["@EMAILADDRESS"].Value.ToString(); if (!string.IsNullOrEmpty(command.Parameters["@EMAILADDRESSTYPECODEID"].Value.ToString())) { this._customModel.EMAILADDRESSTYPECODEID.Value = Guid.Parse(command.Parameters["@EMAILADDRESSTYPECODEID"].Value.ToString()); } if (this._customModel.EMAILADDRESSTYPECODEID.HasValue()) { this._customModel.EMAILADDRESSTYPE.Value = command.Parameters["@EMAILADDRESSTYPE"].Value.ToString(); } //TODO: CONSTITUENTCIES //_customModel.CONSTITUENCIES.Value = command.Parameters["@CONSTITUENCYCODEID"].Value; if (!string.IsNullOrEmpty(command.Parameters["@BATCHID"].Value.ToString())) { this._customModel.BATCHID.Value = Guid.Parse(command.Parameters["@BATCHID"].Value.ToString()); } _customModel.BATCHTYPE.Value = (DuplicateResolutionUIModel.BATCHTYPES) int.Parse(command.Parameters["@BATCHTYPE"].Value.ToString()); _customModel.NAMECODE.Value = (DuplicateResolutionUIModel.NAMECODES) int.Parse(command.Parameters["@NAMECODE"].Value.ToString()); _customModel.SIMILARADDRESSCODE.Value = (DuplicateResolutionUIModel.SIMILARADDRESSCODES) int.Parse(command.Parameters["@SIMILARADDRESSCODE"].Value.ToString()); _customModel.UNSIMILARADDRESSCODE.Value = (DuplicateResolutionUIModel.UNSIMILARADDRESSCODES) int.Parse(command.Parameters["@UNSIMILARADDRESSCODE"].Value.ToString()); _customModel.NEWADDRESSPRIMARYCODE.Value = (DuplicateResolutionUIModel.NEWADDRESSPRIMARYCODES) int.Parse(command.Parameters["@NEWADDRESSPRIMARYCODE"].Value.ToString()); _customModel.DIFFERENTPHONECODE.Value = (DuplicateResolutionUIModel.DIFFERENTPHONECODES) int.Parse(command.Parameters["@DIFFERENTPHONECODE"].Value.ToString()); _customModel.NEWPHONEPRIMARYCODE.Value = (DuplicateResolutionUIModel.NEWPHONEPRIMARYCODES) int.Parse(command.Parameters["@NEWPHONEPRIMARYCODE"].Value.ToString()); _customModel.DIFFERENTEMAILCODE.Value = (DuplicateResolutionUIModel.DIFFERENTEMAILCODES) int.Parse(command.Parameters["@DIFFERENTEMAILCODE"].Value.ToString()); _customModel.NEWEMAILPRIMARYCODE.Value = (DuplicateResolutionUIModel.NEWEMAILPRIMARYCODES) int.Parse(command.Parameters["@NEWEMAILPRIMARYCODE"].Value.ToString()); _customModel.BIRTHDATERULECODE.Value = (DuplicateResolutionUIModel.BIRTHDATERULECODES) int.Parse(command.Parameters["@BIRTHDATERULECODE"].Value.ToString()); if (_customModel.AUTOMATCHRECORDID.HasValue()) { //dataFormLoadReply.DataFormItem.TryGetValue("ADDRESSISPRIMARY", ref this._incomingAddressPrimary); //dataFormLoadReply.DataFormItem.TryGetValue("PHONEISPRIMARY", ref this._incomingPhonePrimary); //dataFormLoadReply.DataFormItem.TryGetValue("EMAILISPRIMARY", ref this._incomingEmailPrimary); } _customModel.GENDERCODE.Value = (DuplicateResolutionUIModel.GENDERCODES) int.Parse(command.Parameters["@GENDERCODE"].Value.ToString()); if (!string.IsNullOrEmpty(command.Parameters["@MARITALSTATUSCODEID"].Value.ToString())) { this._customModel.MARITALSTATUSCODEID.Value = Guid.Parse(command.Parameters["@MARITALSTATUSCODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@GIVESANONYMOUSLY"].Value.ToString())) { _customModel.GIVESANONYMOUSLY.Value = bool.Parse(command.Parameters["@GIVESANONYMOUSLY"].Value.ToString()); } _customModel.NICKNAME.Value = command.Parameters["@NICKNAME"].Value.ToString(); _customModel.MAIDENNAME.Value = command.Parameters["@MAIDENNAME"].Value.ToString(); //SAO _customModel.DECEASED.Value = bool.Parse(command.Parameters["@DECEASED"].Value.ToString()); if (!string.IsNullOrEmpty(command.Parameters["@DECEASEDDATE"].Value.ToString()) && command.Parameters["@DECEASEDDATE"].Value.ToString() != "00000000") { _customModel.DECEASEDDATE.Value = FuzzyDate.Parse(command.Parameters["@DECEASEDDATE"].Value.ToString()); } _customModel.WEBADDRESS.Value = command.Parameters["@WEBADDRESS"].Value.ToString(); if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSHISTORICALSTARTDATE"].Value.ToString())) { _customModel.ADDRESSHISTORICALSTARTDATE.Value = DateTime.Parse(command.Parameters["@ADDRESSHISTORICALSTARTDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSHISTORICALENDDATE"].Value.ToString())) { _customModel.ADDRESSHISTORICALENDDATE.Value = DateTime.Parse(command.Parameters["@ADDRESSHISTORICALENDDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSDONOTMAIL"].Value.ToString())) { _customModel.ADDRESS_DONOTMAIL.Value = bool.Parse(command.Parameters["@ADDRESSDONOTMAIL"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSDONOTMAILREASONCODEID"].Value.ToString())) { this._customModel.ADDRESSDONOTMAILREASONCODEID.Value = Guid.Parse(command.Parameters["@ADDRESSDONOTMAILREASONCODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSSTARTDATE"].Value.ToString()) && command.Parameters["@ADDRESSSTARTDATE"].Value.ToString() != "0000") { _customModel.ADDRESSSTARTDATE.Value = MonthDay.Parse(command.Parameters["@ADDRESSSTARTDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSENDDATE"].Value.ToString()) && command.Parameters["@ADDRESSENDDATE"].Value.ToString() != "0000") { _customModel.ADDRESSENDDATE.Value = MonthDay.Parse(command.Parameters["@ADDRESSENDDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSINFOSOURCECODEID"].Value.ToString())) { this._customModel.ADDRESSINFOSOURCECODEID.Value = Guid.Parse(command.Parameters["@ADDRESSINFOSOURCECODEID"].Value.ToString()); } _customModel.ADDRESSINFOSOURCECOMMENTS.Value = command.Parameters["@ADDRESSINFOSOURCECOMMENTS"].Value.ToString(); _customModel.ADDRESSDPC.Value = command.Parameters["@ADDRESSDPC"].Value.ToString(); _customModel.ADDRESSCART.Value = command.Parameters["@ADDRESSCART"].Value.ToString(); _customModel.ADDRESSLOT.Value = command.Parameters["@ADDRESSLOT"].Value.ToString(); if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSCOUNTYCODEID"].Value.ToString())) { this._customModel.ADDRESSCOUNTYCODEID.Value = Guid.Parse(command.Parameters["@ADDRESSCOUNTYCODEID"].Value.ToString()); } if ( !string.IsNullOrEmpty(command.Parameters["@ADDRESSCONGRESSIONALDISTRICTCODEID"].Value.ToString())) { this._customModel.ADDRESSCONGRESSIONALDISTRICTCODEID.Value = Guid.Parse(command.Parameters["@ADDRESSCONGRESSIONALDISTRICTCODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSSTATEHOUSEDISTRICTCODEID"].Value.ToString())) { this._customModel.ADDRESSSTATEHOUSEDISTRICTCODEID.Value = Guid.Parse(command.Parameters["@ADDRESSSTATEHOUSEDISTRICTCODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSSTATESENATEDISTRICTCODEID"].Value.ToString())) { this._customModel.ADDRESSSTATESENATEDISTRICTCODEID.Value = Guid.Parse(command.Parameters["@ADDRESSSTATESENATEDISTRICTCODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSLOCALPRECINCTCODEID"].Value.ToString())) { this._customModel.ADDRESSLOCALPRECINCTCODEID.Value = Guid.Parse(command.Parameters["@ADDRESSLOCALPRECINCTCODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSCERTIFICATIONDATA"].Value.ToString())) { _customModel.ADDRESSCERTIFICATIONDATA.Value = int.Parse(command.Parameters["@ADDRESSCERTIFICATIONDATA"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSLASTVALIDATIONATTEMPTDATE"].Value.ToString())) { _customModel.ADDRESSLASTVALIDATIONATTEMPTDATE.Value = DateTime.Parse(command.Parameters["@ADDRESSLASTVALIDATIONATTEMPTDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@ADDRESSOMITFROMVALIDATION"].Value.ToString())) { _customModel.ADDRESSOMITFROMVALIDATION.Value = bool.Parse(command.Parameters["@ADDRESSOMITFROMVALIDATION"].Value.ToString()); } _customModel.ADDRESSVALIDATIONMESSAGE.Value = command.Parameters["@ADDRESSVALIDATIONMESSAGE"].Value.ToString(); if (!string.IsNullOrEmpty(command.Parameters["@PHONECOUNTRYID"].Value.ToString())) { this._customModel.PHONECOUNTRYID.Value = Guid.Parse(command.Parameters["@PHONECOUNTRYID"].Value.ToString()); } _customModel.PHONEDONOTCALL.Value = false; if (!string.IsNullOrEmpty(command.Parameters["@PHONESEASONALSTARTDATE"].Value.ToString()) && command.Parameters["@PHONESEASONALSTARTDATE"].Value.ToString() != "0000") { _customModel.PHONESEASONALSTARTDATE.Value = MonthDay.Parse(command.Parameters["@PHONESEASONALSTARTDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@PHONESEASONALENDDATE"].Value.ToString()) && command.Parameters["@PHONESEASONALENDDATE"].Value.ToString() != "0000") { _customModel.PHONESEASONALENDDATE.Value = MonthDay.Parse(command.Parameters["@PHONESEASONALENDDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@PHONESTARTTIME"].Value.ToString()) && command.Parameters["@PHONESTARTTIME"].Value.ToString() != "0000") { _customModel.PHONESTARTTIME.Value = HourMinute.Parse(command.Parameters["@PHONESTARTTIME"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@PHONEENDTIME"].Value.ToString()) && command.Parameters["@PHONEENDTIME"].Value.ToString() != "0000") { _customModel.PHONEENDTIME.Value = HourMinute.Parse(command.Parameters["@PHONEENDTIME"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@PHONESTARTDATE"].Value.ToString())) { _customModel.PHONESTARTDATE.Value = DateTime.Parse(command.Parameters["@PHONESTARTDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@PHONEENDDATE"].Value.ToString())) { _customModel.PHONEENDDATE.Value = DateTime.Parse(command.Parameters["@PHONEENDDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@PHONEINFOSOURCECODEID"].Value.ToString())) { this._customModel.PHONEINFOSOURCECODEID.Value = Guid.Parse(command.Parameters["@PHONEINFOSOURCECODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@EMAILADDRESSDONOTEMAIL"].Value.ToString())) { _customModel.EMAILADDRESSDONOTEMAIL.Value = bool.Parse(command.Parameters["@EMAILADDRESSDONOTEMAIL"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@EMAILADDRESSSTARTDATE"].Value.ToString())) { _customModel.EMAILADDRESSSTARTDATE.Value = DateTime.Parse(command.Parameters["@EMAILADDRESSSTARTDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@EMAILADDRESSENDDATE"].Value.ToString())) { [email protected] = DateTime.Parse(command.Parameters["@EMAILADDRESSENDDATE"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@EMAILADDRESSINFOSOURCECODEID"].Value.ToString())) { this._customModel.EMAILADDRESSINFOSOURCECODEID.Value = Guid.Parse(command.Parameters["@EMAILADDRESSINFOSOURCECODEID"].Value.ToString()); } if (!string.IsNullOrEmpty(command.Parameters["@DECEASED"].Value.ToString())) { _customModel.DECEASED.Value = bool.Parse(command.Parameters["@DECEASED"].Value.ToString()); } } } }