private void btnSeeBill_Click(object sender, EventArgs e) { frmDetail_Import_Bill frmDetail_Import_Bill = new frmDetail_Import_Bill(); frmDetail_Import_Bill.ShowDialog(); Uc_SP_Load(Convert.ToInt32(txtPage.Text)); }
private void dgvHD_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (dgvHD.Columns[e.ColumnIndex].Name == "Column7") { frmDetail_Import_Bill detail_Import_Bill = new frmDetail_Import_Bill(); Uc_WareHouse.GetData.idBill = dgvHD.Rows[e.RowIndex].Cells[0].Value.ToString(); detail_Import_Bill.ShowDialog(); } } }
private void dgvBillBuy_CellContentClick(object sender, DataGridViewCellEventArgs e) { btnPrintBill.Visible = true; btnMail.Visible = true; if (e.RowIndex >= 0) { GetData.idBill = dgvBillBuy.Rows[e.RowIndex].Cells[0].Value.ToString(); GetData.trThai = dgvBillBuy.Rows[e.RowIndex].Cells[3].Value.ToString(); if (dgvBillBuy.Columns[e.ColumnIndex].Name.Equals("Column5")) { frmDetail_Import_Bill frmDetail_Import_Bill = new frmDetail_Import_Bill(); Uc_SanPham.GetData.idBill = idSp; frmDetail_Import_Bill.ShowDialog(); Uc_SanPham.GetData.idBill = ""; Uc_Bill_Buy_Load(sender, e); } else if (dgvBillBuy.Columns[e.ColumnIndex].Name.Equals("Column6")) { if (GetData.trThai == "Paid") { nhanVien nv = db.nhanViens.Where(s => s.maNV.Equals(frmLogin.GetID.id) && s.maCV == "cv4").FirstOrDefault(); if (nv == null) { //btnSave.Visible = false; //MessageBox.Show("You do not have permission to cancel the bill was paid"); //MessageBox.Show("This bill cannot be cancel.\nBecause it was cancel already or was paid"); //rtxtNote.Visible = false; //lbNote.Visible = false; } else { //rtxtNote.Visible = true; //lbNote.Visible = true; //btnSave.Visible = true; } } else { MessageBox.Show("This bill don't need to cancel"); //rtxtNote.Visible = true; //lbNote.Visible = true; //btnSave.Visible = true; } } } }