private void next() { string[] around = File.ReadAllText(script.file_around).Split('|'); if (txt_emp_id.Text.Trim() == around[0]) { string sql = "UPDATE tbl_status_around SET tbl_status_around_close = '1' WHERE tbl_status_around_close = '0' AND tbl_status_around_emp_open_id = '" + txt_emp_id.Text + "'"; if (script.InsertUpdae_SQL(sql)) { MessageBox.Show("ปิดกะเรียบร้อย", "ผลลัพธ์", MessageBoxButtons.OK, MessageBoxIcon.Information); ReportIncomForm ri = new ReportIncomForm(mainForm); if (mainForm.line9 == "9" || mainForm.cpoint_id == "701" || mainForm.cpoint_id == "702" || mainForm.cpoint_id == "710") { //ri.GetReport(int.Parse(around[1]), around[2], true, true, false); } else { //ri.GetReport(int.Parse(around[1]), around[2], false, true, false); } File.Delete(script.file_around); Application.Restart(); } else { MessageBox.Show("Error", "แจ้งเตือน", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("รหัสรองผู้เปิด/ปิดกะ ต้องเป็นคนเดียวกัน หรือ รหัสไม่ถูกต้อง", "แจ้งเตือน", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txt_emp_id.Clear(); } script.conn.Close(); }
private void btn_r1_Click(object sender, EventArgs e) { ReportIncomForm reportIncomForm = new ReportIncomForm(menuForm); reportIncomForm.ShowDialog(); }