private void xrTableCell15_PreviewClick(object sender, PreviewMouseEventArgs e) { baocaocongno131 bccn = new baocaocongno131(); for (int i = 0; i < dt1.Rows.Count; i++) { if (dt1.Rows[i][1].ToString() == e.Brick.Text) { if (tsbt1 == "131tndnbh" || tsbt1 == "331tndnbh") { bccn.loadbchitietcntndnbh(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][0].ToString()); } else if (tsbt1 == "1313tndntdv") { if (XtraMessageBox.Show("Nhấn 'yes' để in chi tiết, 'no' để in công nợ vỏ.", "HAMACO", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes) { bccn.loadbchitietcntndn(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][0].ToString(), dt1.Rows[i][9].ToString(), dt1.Rows[i][10].ToString()); } else { bccn.loadbccnvotndn(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][0].ToString()); } } else { bccn.loadbchitietcntndn(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][0].ToString(), dt1.Rows[i][9].ToString(), dt1.Rows[i][10].ToString()); } return; } } }
private void xrTableCell15_PreviewClick(object sender, PreviewMouseEventArgs e) { baocaocongno131 bccn = new baocaocongno131(); for (int i = 0; i < dt1.Rows.Count; i++) { if (dt1.Rows[i][1].ToString() == e.Brick.Text) { DialogResult dr = XtraMessageBox.Show("Nhấn 'Yes' bảng kê tổng hợp, 'No' để in bảng kê phát sinh, 'Cancel' để in biên bản xác nhận vỏ.", "Thông báo", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); if (dr == DialogResult.Yes) { if (tsbt1 == "tsbtbccnvkh" || tsbt1 == "tsbtbccnvncc") { bccn.loadbccnvotndn(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][0].ToString()); } else if (tsbt1 == "tsbtbccnvkhth" || tsbt1 == "tsbtbccnvnccth" || tsbt1 == "tsbtbccnvkhtk") { bccn.loadbccnvotndn(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][1].ToString()); } } else if (dr == DialogResult.No) { if (tsbt1 == "tsbtbccnvkh" || tsbt1 == "tsbtbccnvncc") { bccn.loadbccnvotndnphatsinh(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][0].ToString()); } else if (tsbt1 == "tsbtbccnvkhth" || tsbt1 == "tsbtbccnvkhtk" || tsbt1 == "tsbtbccnvnccth") { bccn.loadbccnvotndnphatsinh(tungay1, denngay1, tsbt1, kho1, dt1.Rows[i][1].ToString()); } } else if (dr == DialogResult.Cancel) { if (tsbt1 == "tsbtbccnvkhth") { bccn.loadbccnvotndn(tungay1, denngay1, tsbt1 + "bbxn", kho1, dt1.Rows[i][1].ToString()); } } return; } } }