Beispiel #1
0
 private void btn_ImportBatchNo_Click(object sender, EventArgs e)
 {
     if (dt.Select("Modified = 1").Length == 0 || MessageBox.Show("個案施打紀錄尚未儲存,確定要離開嗎?", "紀錄尚未儲存", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) != DialogResult.No)
     {
         Form_ImportBatchNo form_ImportBatchNo = new Form_ImportBatchNo();
         form_ImportBatchNo.FormClosed += ChildFormClosed;
         form_ImportBatchNo.AgencyCode  = AgencyCode;
         form_ImportBatchNo.Show(this);
         Hide();
     }
 }
Beispiel #2
0
        private void Form_Main_Load(object sender, EventArgs e)
        {
            string    sql       = "select VaccineCode,VaccineNo,VaccBatchNo,VaccineCode || ' ('||ChName|| ')' ChName from VaccineData";
            DataTable dataTable = (DataTable)DataBaseUtilities.DBOperation(Program.ConnectionString, sql, null, CommandOperationType.ExecuteReaderReturnDataTable);

            if (dataTable.Rows.Count == 0)
            {
                MessageBox.Show("尚未匯入疫苗批次資料,請先進行檔案匯入!", "系統提醒", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                Form_ImportBatchNo form_ImportBatchNo = new Form_ImportBatchNo();
                form_ImportBatchNo.FormClosed += ChildFormClosed;
                form_ImportBatchNo.AgencyCode  = AgencyCode;
                form_ImportBatchNo.Show(this);
                Hide();
            }
        }