/// <summary> /// Function for Save /// </summary> public void SaveFunction() { try { ReminderSP spReminder = new ReminderSP(); ReminderInfo infoReminder = new ReminderInfo(); infoReminder.FromDate = dtpFromDate.Value; infoReminder.ToDate = dtpToDate.Value; infoReminder.RemindAbout = txtRemindAbout.Text.Trim(); infoReminder.Extra1 = string.Empty; infoReminder.Extra2 = string.Empty; infoReminder.ExtraDate = DateTime.Now; if (spReminder.ReminderAdd(infoReminder)) { Messages.SavedMessage(); } } catch (Exception ex) { MessageBox.Show("PREM2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function for Save /// </summary> public void SaveFunction() { try { ReminderSP spReminder = new ReminderSP(); ReminderInfo infoReminder = new ReminderInfo(); infoReminder.FromDate = dtpFromDate.Value; infoReminder.ToDate = dtpToDate.Value; infoReminder.RemindAbout = txtRemindAbout.Text.Trim(); infoReminder.Extra1 = PublicVariables._decCurrentUserId.ToString(); infoReminder.Extra2 = string.Empty; infoReminder.ExtraDate = DateTime.Now; if (spReminder.ReminderAdd(infoReminder)) { Messages.SavedMessage(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "PREM2:" + ex.Message; } }