示例#1
0
 private void btnEditSchedule_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.AppStarting;
         frmScheduleCall frm = new frmScheduleCall(this.SelectedScheduleID);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateAllSchedules();
         }
         this.Cursor = Cursors.Default;
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "ctrlScheduleCallLog::btnEditSchedule_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#2
0
 private void btnAddNewSchedule_Click(object sender, EventArgs e)
 {
     try
     {
         frmScheduleCall frm = new frmScheduleCall();
         frm.MODEL.SOURCE_ENTITY    = this.SOURCE_ENTITY;
         frm.MODEL.SOURCE_ENTITY_ID = this.SOURCE_ENTITY_ID;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateAllSchedules();
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "ctrlScheduleCallLog::btnAddNewSchedule_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }