/// <summary> /// double click ดูรายการ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int id = int.Parse(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value.ToString()); POEditForm obj = new POEditForm(this, id); obj.ShowDialog(); }
/// <summary> /// แก้ไข ที่เลือก /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonApprove_Click(object sender, EventArgs e) { int rowCurrent = dataGridView1.CurrentRow.Index; int id = int.Parse(dataGridView1.Rows[rowCurrent].Cells[0].Value.ToString()); int poStatus = int.Parse(dataGridView1.Rows[rowCurrent].Cells[9].Value.ToString()); if (poStatus == MyConstant.POStatus.RCVNotEnd || poStatus == MyConstant.POStatus.NotRCV) { // แก้ไขได้ //MessageBox.Show("แหล่ม"); POEditForm obj = new POEditForm(this, id); obj.ShowDialog(); } else { MessageBox.Show("ไม่สามารถแก้ไขได้ กรุณาตวจสอบสถานะ PO"); } }