private void monthView_OnOpenDetailsEvent(object sender, EventArgs e) { if (calendarDisplayMode != CalendarMode.Day) { calendarDisplayMode = CalendarMode.Day; dayButton.IsChecked = true; UpdateRibbon(); MonthDay _sender = (MonthDay)sender; CreateDayView(); dayView.Month = _sender.Date.Month; dayView.Year = _sender.Date.Year; dayView.Day = _sender.Date.Day; dayView.UpdateDisplay(); if (Settings.AnimationsEnabled) { AnimationHelpers.ZoomDisplay anim = new AnimationHelpers.ZoomDisplay(monthView, dayView); anim.SwitchViews(AnimationHelpers.ZoomDirection.In); } else { dayView.Visibility = Visibility.Visible; monthView.Visibility = Visibility.Hidden; } } }
private void Grid_MouseUp(object sender, MouseButtonEventArgs e) { MonthDay mDay = ((MonthDay)((Grid)sender).DataContext); if (mDay.Date > DateTime.Now) { return; } mDay.Checked = !mDay.Checked; MainWindow mainWindow = ((MainWindow)Application.Current.MainWindow); if (mDay.Checked) { var habitDay = mainWindow.viewModel.Settings.HabitDays.ToList().FindIndex(s => s.ToString("MM/dd/yyyy") == mDay.Date.ToString("MM/dd/yyyy")); if (habitDay == -1) { mainWindow.viewModel.Settings.HabitDays.Add(mDay.Date); } } else { var habitDay = mainWindow.viewModel.Settings.HabitDays.ToList().FindIndex(s => s.ToString("MM/dd/yyyy") == mDay.Date.ToString("MM/dd/yyyy")); if (habitDay != -1) { mainWindow.viewModel.Settings.HabitDays.RemoveAt(habitDay); } } }
public override object?ConvertFrom(ITypeDescriptorContext?context, CultureInfo?culture, object value) { var str = value as string; return(str != null ? MonthDay.Parse(str) : base.ConvertFrom(context, culture, value)); }
private string MonthDayDesc() { string message = "每月"; int[] daylist = MonthDay.ToArray(); for (int i = 0; i < daylist.Length; i++) { message += daylist[i].ToString() + "号,"; } return(message.Substring(0, message.Length - 1)); }
private static LocalDate parseDate(int year, string str) { try { return(MonthDay.parse(str, DAY_MONTH_PARSER).atYear(year)); } catch (DateTimeParseException) { LocalDate date = LocalDate.parse(str); if (date.Year != year) { throw new System.ArgumentException("Parsed date had incorrect year: " + str + ", but expected: " + year); } return(date); } }
static void Main(string[] args) { Console.WriteLine("Hello,NET 4.0"); RuntimeCompatibilityAttribute attr = new RuntimeCompatibilityAttribute(); FileStream fileStream = new FileStream("f:\\temp.dat", FileMode.Create); BinaryFormatter b = new BinaryFormatter(); b.Serialize(fileStream, attr); string s = attr.ToString(); string classname = "ActorInfo"; string tx = string.Format("static StringItem s_{0}-{0}Methods[]={{", classname); Console.WriteLine(tx); Type type = typeof(Program); if (type.Name == "Program") { // Name=> } Console.WriteLine("Type Name:" + type.Name); Console.WriteLine("Type Name:" + type.FullName); Type t = Type.GetType("HelloWorld.Program"); Program p = (Program)Activator.CreateInstance(t); p.test(); MethodInfo method = t.GetMethod("test"); BindingFlags flag = BindingFlags.Public | BindingFlags.Instance; object[] parameters = new object[] { }; object returnValue = method.Invoke(p, parameters); MonthDay e1 = MonthDay.Monday; Console.WriteLine("e:" + e1.ToString()); Object o = Enum.Parse(typeof(MonthDay), "Monday"); MonthDay o1 = (MonthDay)o; Console.WriteLine("MonthDay:" + o1); }
/// <summary> /// Parse a date and time for format-date() /// </summary> /// <param name="d"></param> /// <returns></returns> public static ExsltDateTime ParseDateTime(string d) { // First try any of the classes in ParseDate try { return ParseDate(d); } catch (FormatException) { } try { TimeTZ t = new TimeTZ(d); return t; } catch (FormatException) { } try { MonthDay t = new MonthDay(d); return t; } catch (FormatException) { } try { Month t = new Month(d); return t; } catch (FormatException) { } // Finally day -- don't catch the exception { Day t = new Day(d); return t; } }
public static MonthDay Parse(string str) { MonthDay monthDay; var match = regex.Match(str); if (match.Groups["Last"].Success) { monthDay = MonthDay.LastDay; } else if (match.Groups["Day"].Success) { monthDay = new MonthDay(int.Parse(match.Groups["Day"].Value)); } else { monthDay = new MonthDay(); } return(monthDay); }
public bool ProcessFutureDates() { DateTime startDate = RecurrenceStartDate; //DateTime endDate; //if (RecurrenceEndAfterNSelected == true) //{ // //endDate = RecurrenceEndByDate; //} //else //{ // throw new Exception("Recurrence end date else issue"); //} int counter = 0; //public bool MonthlyEveryNMonthsSelected; //public int MonthlyDayOfMonth; //public int MonthlyEveryNMonths; if (MonthlyEveryNMonthsSelected == true) { //Get the next day that matches this in the current month //DateTime currentMonthlyDate; //if (RecurrenceStartDate.Day > MonthlyDayOfMonth) //{ // currentMonthlyDate = new DateTime(RecurrenceStartDate.Year, RecurrenceStartDate.Month + 1, MonthlyDayOfMonth); //} //else //{ // currentMonthlyDate = new DateTime(RecurrenceStartDate.Year, RecurrenceStartDate.Month, MonthlyDayOfMonth); //} int monthyMonthCounter = 0; while (counter < RecurrenceEndAfterNOccurences) { FutureDatesEnqueue(startDate.AddMonths(monthyMonthCounter)); monthyMonthCounter += MonthlyEveryNMonths; counter++; } } else if (MonthlyTheNDaySelected == true) { //int monthlyWeekCounter = (int)MonthlyTheNOccurrence + 1; //DayOfWeek monthlyCountCounter = MonthlyTheNDayOfWeek; int monthyMonthCounter = 0; while (counter < RecurrenceEndAfterNOccurences) { DateTime monthDate = startDate.AddMonths(monthyMonthCounter); DateTime firstDayOfMonth = new DateTime(monthDate.Year, monthDate.Month, 1); int daysInMonth = DateTime.DaysInMonth(monthDate.Year, monthDate.Month); MonthDayCollection dayCollection = new MonthDayCollection(); for (int i = 1; i <= daysInMonth; i++) { //Create month for each day MonthDay day = new MonthDay { DayOfWeek = firstDayOfMonth.AddDays(i - 1).DayOfWeek, Count = dayCollection.CountDayOfWeek(firstDayOfMonth.AddDays(i - 1).DayOfWeek) + 1, Date = firstDayOfMonth.AddDays(i - 1) }; //Add what day it is, and the occurenace of each day dayCollection.Days.Add(day); } FutureDatesEnqueue(dayCollection.FindDayOfWeek(MonthlyTheNDayOfWeek, MonthlyTheNOccurrence).Date); monthyMonthCounter += MonthlyTheNDayDayMonth; counter++; } } return(true); }
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()); } } } }