private void frmReport_Load(object sender, System.EventArgs e) { this.Report.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); this.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); i_nhom = get_nhomkho(); i_soluong_le = ttb.d_soluong_le(i_nhom); i_dongia_le = ttb.d_dongia_le(i_nhom); i_thanhtien_le = ttb.d_thanhtien_le(i_nhom); string dir = System.IO.Directory.GetCurrentDirectory(); ExportPath = ""; int j = 0; for (int i = 0; i < dir.Length; i++) { if (dir.Substring(i, 1) == "\\") { j++; } if (j == 2) { break; } ExportPath += dir.Substring(i, 1); } ExportPath += "\\pdf\\"; if (!System.IO.Directory.Exists(ExportPath)) { System.IO.Directory.CreateDirectory(ExportPath); } PreviewReport(); }
private void frmDenghict_Load(object sender, System.EventArgs e) { user = ttb.user; f_ngay = ttb.f_ngay; i_thanhtien_le = ttb.d_thanhtien_le(i_nhom); dsdn.ReadXml("..\\..\\..\\xml\\ttb_denghict.xml"); ds.ReadXml("..\\..\\..\\xml\\ttb_denghi.xml"); kinhgui.Text = ds.Tables[0].Rows[0]["KINHGUI"].ToString(); denghi.Text = ds.Tables[0].Rows[0]["DENGHI"].ToString(); bophan.Text = ds.Tables[0].Rows[0]["BOPHAN"].ToString(); noidung.Text = ds.Tables[0].Rows[0]["NOIDUNG"].ToString(); ketoan.Text = ds.Tables[0].Rows[0]["KETOAN"].ToString(); giamdoc.Text = ds.Tables[0].Rows[0]["GIAMDOC"].ToString(); dtdmnx = ttb.get_data("select ma,ten,id,nhomcc,diachi,masothue from " + user + ".ttb_dmnx where nhom=" + i_nhom + " order by stt").Tables[0]; listNX.DisplayMember = "MA"; listNX.ValueMember = "TEN"; listNX.DataSource = dtdmnx; if (s_madv != "") { madv.Text = s_madv; tendv.Text = s_tendv; tu.Value = new DateTime(int.Parse(s_ngayhd.Substring(6, 4)), int.Parse(s_ngayhd.Substring(3, 2)), int.Parse(s_ngayhd.Substring(0, 2)), 0, 0, 0); den.Value = tu.Value; butLoc_Click(sender, e); } }