private void aDDToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Internal_Request_Details a = new Frm_Internal_Request_Details(); a.type = "0"; a.ShowDialog(); LoadData(); }
private void eDITToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Internal_Request_Details a = new Frm_Internal_Request_Details(); a.type = "1"; //Tình trạng đang PENDING mới cho chỉnh sửa if (dataGridView1["STATUS", dataGridView1.CurrentCell.RowIndex].Value.ToString() != "PENDING")//STATUS ='PENDING' { MessageBox.Show("Yêu cầu này đã duyệt hoặc đang được xử lý, không được chỉnh sửa."); return; } if (dataGridView1["user_create", dataGridView1.CurrentCell.RowIndex].Value.ToString().Trim().ToUpper() != Businessbp.executedb.Usrid.Trim().ToUpper())//STATUS ='PENDING' { MessageBox.Show("Bạn không phải người tạo yêu cầu, không được chỉnh sửa."); return; } a.ref_no = dataGridView1["REF_NO", dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.ShowDialog(); LoadData(); }
private void xửLýYêuCầuToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Internal_Request_Details a = new Frm_Internal_Request_Details(); a.type = "3"; //Chưa duyệt thì k dc xử lý //if (dataGridView1["user_receiver", dataGridView1.CurrentCell.RowIndex].Value.ToString().Trim().ToUpper() != Businessbp.executedb.Usrid.Trim().ToUpper()) //{ if (dataGridView1["STATUS", dataGridView1.CurrentCell.RowIndex].Value.ToString().Trim().ToUpper() != "AUTHORIZE".Trim().ToUpper()) { if (dataGridView1["STATUS", dataGridView1.CurrentCell.RowIndex].Value.ToString().Trim().ToUpper() != "DONE".Trim().ToUpper() && dataGridView1["STATUS", dataGridView1.CurrentCell.RowIndex].Value.ToString().Trim().ToUpper() != "REJECT".Trim().ToUpper()) { MessageBox.Show("Yêu cầu này chưa được duyệt, không được xử lý."); return; } } //user tạo yêu cầu k dc xử lý yêu cầu if (dataGridView1["user_create", dataGridView1.CurrentCell.RowIndex].Value.ToString().Trim().ToUpper() == Businessbp.executedb.Usrid.Trim().ToUpper())//STATUS ='PENDING' { MessageBox.Show("Bạn là người tạo yêu cầu, không được xử lý yêu cầu."); return; } // } a.ref_no = dataGridView1["REF_NO", dataGridView1.CurrentCell.RowIndex].Value.ToString(); a.ShowDialog(); LoadData(); }