Пример #1
0
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            try
            {
                TableDialogDal dialogDal = new TableDialogDal();
                fields = dialogDal.GetField("FORMULAMASTER");

                ScheduleDal scheduleDal = new ScheduleDal();
                bsMain.DataSource = scheduleDal.GetSchedule();
                DataGridViewAutoFilter.DataGridViewAutoFilterTextBoxColumn.RemoveFilter(dgvMain);
            }
            catch (Exception exp)
            {
                THOKUtil.ShowInfo("���������ƻ�����ʧ�ܣ�ԭ��" + exp.Message);
            }
        }
Пример #2
0
 private void btnImport_Click(object sender, EventArgs e)
 {
     ScheduleDialog scheduleDialog = new ScheduleDialog();
     if (scheduleDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             ScheduleDal scheduleDal = new ScheduleDal();
             scheduleDal.AddSchedule(scheduleDialog.ScheduleBatch,
                                 //scheduleDialog.ScheduleUnit,
                                 scheduleDialog.CigaretteCode,
                                 scheduleDialog.CigaretteName,
                                 scheduleDialog.Quantity);
             bsMain.DataSource = scheduleDal.GetSchedule();
         }
         catch (Exception exp)
         {
             THOKUtil.ShowInfo(exp.Message);
         }
     }
 }