コード例 #1
0
        private void butCloseOffice_Click(object sender, System.EventArgs e)
        {
            if (SchedListDay.Length == 1 &&
                SchedListDay[0].Status == SchedStatus.Closed)
            {
                MessageBox.Show(Lan.g(this, "Day is already Closed."));
                return;
            }
            if (SchedListDay.Length > 0)
            {
                for (int i = 0; i < SchedListDay.Length; i++)
                {
                    Schedules.Delete(SchedListDay[i]);
                }
            }
            Schedule SchedCur = new Schedule();

            SchedCur.SchedDate = SchedCurDate;
            SchedCur.Status    = SchedStatus.Closed;
            SchedCur.SchedType = SchedType;
            SchedCur.ProvNum   = ProvNum;
            FormScheduleBlockEdit FormSB = new FormScheduleBlockEdit(SchedCur);

            FormSB.IsNew = true;
            FormSB.ShowDialog();
            FillList();
        }
コード例 #2
0
		private void butDelete_Click(object sender, System.EventArgs e) {
			if(MessageBox.Show(Lan.g(this,"Delete Blockout?"),"",MessageBoxButtons.OKCancel)!=DialogResult.OK){
			  return;   
			}
      if(IsNew){
        DialogResult=DialogResult.Cancel; 
      }
      else{ 
        Schedules.Delete(SchedCur);	
      }
      DialogResult=DialogResult.Cancel;
		}
コード例 #3
0
 private void butDelete_Click(object sender, System.EventArgs e)
 {
     if (MessageBox.Show(Lan.g(this, "Delete Blockout?"), "", MessageBoxButtons.OKCancel) != DialogResult.OK)
     {
         return;
     }
     if (IsNew)
     {
         DialogResult = DialogResult.Cancel;
     }
     else
     {
         Schedules.Delete(_schedCur);
         SecurityLogs.MakeLogEntry(Permissions.Blockouts, 0, "Blockout delete.");
     }
     DialogResult = DialogResult.Cancel;
 }