private void dgvBillImport_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { try { con = new Connect(); DataGridViewRow datagridview = new DataGridViewRow(); datagridview = dgvBillImport.Rows[e.RowIndex]; int idbill = Convert.ToInt32(datagridview.Cells[0].Value.ToString()); if (idbill >= 0) { BillImportDetail billimport = new BillImportDetail(idbill, userid); DialogResult dr = billimport.ShowDialog(this); if (dr == DialogResult.Cancel) { billimport.Close(); } else if (dr == DialogResult.OK) { billimport.Close(); } } } catch (Exception ex) { throw ex; } }
private void MenuOpenPO_Click(object sender, EventArgs e) { con = new Connect(); ToolStripMenuItem idd10 = sender as ToolStripMenuItem; int id = Convert.ToInt32(idd10.Name); con.Ghilog("Xem chi tiết hóa đơn nhập số:'" + id + "'", userid); BillImportDetail billimport = new BillImportDetail(id, userid); DialogResult dr = billimport.ShowDialog(this); if (dr == DialogResult.Cancel) { billimport.Close(); } else if (dr == DialogResult.OK) { billimport.Close(); } }
private void btnadd_Click(object sender, EventArgs e) { con = new Connect(); int billiid = con.GetIDExStore("[RES_Insert_BillImport]", new string[] { "@UserID", "@Status" }, new object[] { userid1, 0 }); con.Ghilog("Thêm mới hóa đơn", userid1); BillImportDetail billimport = new BillImportDetail(billiid, userid1); billimport.passControl = new BillImportDetail.PassControl(GetTable); DialogResult dr = billimport.ShowDialog(this); if (dr == DialogResult.Cancel) { billimport.Close(); } else if (dr == DialogResult.OK) { billimport.Close(); } }
private void btnedit_Click(object sender, EventArgs e) { if (lblBillID.Text != null && lblBillID.Text != "") { BillImportDetail billimport = new BillImportDetail(Convert.ToInt32(lblBillID.Text), userid1); billimport.passControl = new BillImportDetail.PassControl(GetTable); DialogResult dr = billimport.ShowDialog(this); if (dr == DialogResult.Cancel) { billimport.Close(); } else if (dr == DialogResult.OK) { billimport.Close(); } } else { MessageBox.Show("Bạn chưa chọn hóa đơn", "Notice!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }