private void xrTableCell60_PreviewClick(object sender, PreviewMouseEventArgs e) { if (tsbt == "tsbtbctktttndntpxk" || tsbt == "tsbtbctktttndntaidv") { baocaotonkhovo bctk = new baocaotonkhovo(); for (int i = 0; i < data.Rows.Count; i++) { if (data.Rows[i][15].ToString() == e.Brick.Text) { bctk.inthekhotndn(tungay, denngay, tsbt, kho, data.Rows[i][24].ToString(), data.Rows[i][1].ToString(), data.Rows[i][2].ToString(), data.Rows[i][13].ToString()); return; } } } else if (tsbt == "bchgkh") { baocaotonkhovo bctk = new baocaotonkhovo(); for (int i = 0; i < data.Rows.Count; i++) { if (data.Rows[i][15].ToString() == e.Brick.Text) { bctk.inthekhotndn(tungay, denngay, tsbt, kho, data.Rows[i][24].ToString(), data.Rows[i][1].ToString(), data.Rows[i][2].ToString(), xrLabel5.Text.Substring(0, 8)); return; } } } }
private void xrTableCell60_PreviewClick(object sender, PreviewMouseEventArgs e) { if (loai == "4thucte") { string thang = DateTime.Parse(DateTime.Now.ToString()).Month.ToString(); string nam = DateTime.Parse(DateTime.Now.ToString()).Year.ToString(); string tungay = DateTime.Parse(thang + "/1/" + nam).ToString(); string denngay = DateTime.Parse(DateTime.Parse(DateTime.Now.ToString()).AddDays(1).ToShortDateString()).AddSeconds(-1).ToString(); baocaotonkhovo bctk = new baocaotonkhovo(); for (int i = 0; i < data.Rows.Count; i++) { if (data.Rows[i][0].ToString() == e.Brick.Text) { string mahang = gen.GetString("select InventoryItemID from InventoryItem where InventoryItemCode='" + e.Brick.Text + "'"); bctk.inthekhotndn(tungay, denngay, "tsbtbctktttndntaidvhanggui", kho, mahang, data.Rows[i][10].ToString(), data.Rows[i][11].ToString(), "4"); return; } } } }