コード例 #1
0
 public frmSchedule()
 {
     InitializeComponent();
     CenterToScreen();
     createDataGridViewColumns();
     employees = ComplexQueryHelper.GetAllTechnicians();
     bindFields();
 }
コード例 #2
0
 private void initialise(Schedule schedule, bool insert)
 {
     InitializeComponent();
     CenterToScreen();
     nudCost.Maximum = decimal.MaxValue;
     nudCost.Minimum = decimal.MinValue;
     createDataGridColumns();
     this.insert   = insert;
     this.schedule = schedule;
     schedule.DeepCopyInto(ref oldCopy);
     employees = ComplexQueryHelper.GetAllTechnicians();
     tasks     = StoredProcedureHelper.GetUnassginedTasksWithContracts();
     //If a task has already been assigned and the task is in view mode, add the task to the list of available tasks
     if (schedule.FK_TaskId != "" && !insert)
     {
         tasks.Add(new TaskWithContract("", schedule.Task));
     }
     bindFields(schedule);
     setFieldsEnable(insert);
 }