private void btnXuatExcel_Click(object sender, EventArgs e) { colDaiLyTT.GroupIndex = -1; XuLyGiaoDien.ExportExcel(GCSI, GVSI, "Cấp Sign-" + DateTime.Now.ToString("dd-MM-yyy")); colDaiLyTT.GroupIndex = 0; GVSI.ExpandAllGroups(); }
private void groupControl3_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e) { D_GIAODICH giaoDichD = new D_GIAODICH(); List <Dictionary <string, object> > lstDicS = new List <Dictionary <string, object> >(); List <string> lstTb = new List <string>(); List <string> lstCTV = new List <string>(); List <string> lstThem = new List <string>(); lstThem.Add("S"); lstThem.Add("S"); lstThem.Add("T"); lstTb.Add("GIAODICH"); lstTb.Add("GIAODICH"); lstTb.Add("LS_GIAODICH"); if (!XuLyGiaoDien.wait.IsSplashFormVisible) { XuLyGiaoDien.wait.ShowWaitForm(); } List <O_GIAODICH> sss = lstGDR4.Where(w => w.GhiChu.Contains("Khác kì") || w.GhiChu.Contains("Khác ngày")).ToList(); for (int i = 0; i < sss.Count(); i += 2) { XuLyGiaoDien.wait.SetWaitFormDescription(string.Format("Đang chỉnh ngày GD {0}/{1}", i, sss.Count())); Thread.Sleep(10); O_GIAODICH gd = sss[i]; O_GIAODICH gd2 = sss[i + 1]; Dictionary <string, object> dicS = new Dictionary <string, object>(); Dictionary <string, object> dicS3 = new Dictionary <string, object>(); dicS3.Add("NgayGD", gd2.NgayGD); lstCTV.Add(string.Format("WHERE ID = {0}", gd2.ID)); lstDicS.Add(dicS3); dicS.Add("NgayGD", gd.NgayGD); lstCTV.Add(string.Format("WHERE ID = {0}", gd.ID)); lstDicS.Add(dicS); Dictionary <string, object> dic = new Dictionary <string, object>(); dic.Add("FormName", "Tự động"); dic.Add("MaCho", gd.SoVeVN); dic.Add("NoiDung", "[Vé hoàn]: Chỉnh ngày bằng so sánh VN"); dic.Add("NVGiaoDich", DuLieuTaoSan.NV.ID); dic.Add("LoaiKhachHang", 0); dic.Add("Ma", 0); lstCTV.Add(string.Empty); lstDicS.Add(dic); if (lstDicS.Count == 3) { giaoDichD.CapNhat_ThemNhieu(lstDicS, lstTb, lstCTV, lstThem); lstDicS.Clear(); lstCTV.Clear(); } } XuLyGiaoDien.ExportExcel(gridControl4, gridView8, "ExHoan-" + DateTime.Now.ToString("dd-MM-yyy")); if (XuLyGiaoDien.wait.IsSplashFormVisible) { XuLyGiaoDien.wait.CloseWaitForm(); } }
private void btnExportExcel_ItemClick(object sender, ItemClickEventArgs e) { //List<int> a = _ListGiaoDichO.Select(w => w.IDKhachHang).Distinct().ToList(); //List<DaiLyO> dl = new DaiLyD().DuLieu(1); //foreach(int b in a) //{ // DevExpress.XtraPrinting.XlsxExportOptionsEx opt = new DevExpress.XtraPrinting.XlsxExportOptionsEx(); // opt.CustomizeCell += op_CustomizeCell; // opt.SheetName = "Bản CK"; // DaiLyO dla = dl.Where(w => w.ID.Equals(b)).ToList()[0]; // giaoDichOBindingSource.DataSource = null; // giaoDichOBindingSource.DataSource = _ListGiaoDichO.Where(w => w.IDKhachHang.Equals(b)).ToList(); // string s = @"C:\Users\ICE Cold\Desktop\New folder (2)\"+ dla.Ten + ".xlsx"; // GVGD.ExportToXlsx(s, opt); //} XuLyGiaoDien.ExportExcel(GCGD, GVGD, "ExGD-" + DateTime.Now.ToString("dd-MM-yyy")); }
private void btnExportExcel_ItemClick(object sender, ItemClickEventArgs e) { XuLyGiaoDien.ExportExcel(GCGD, GVGD, "ExKS-" + DateTime.Now.ToString("dd-MM-yyy")); }
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { XuLyGiaoDien.ExportExcel(GCTK, GVTK, "ExTK-" + DateTime.Now.ToString("dd-MM-yyy")); }
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { XuLyGiaoDien.ExportExcel(gridControl1, bandedGridView1, "ExNCCTD-" + DateTime.Now.ToString("dd-MM-yyy")); }
private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e) { XuLyGiaoDien.ExportExcel(GCHD, GVHD, "Bản HD " + DateTime.Now.ToString("dd-MM-yy HH-mm")); }
private void btneXCEL_ItemClick(object sender, ItemClickEventArgs e) { XuLyGiaoDien.ExportExcel(GCDL, GVDL, "DS khách-" + DateTime.Now.ToString("dd-MM-yyy")); }
private void btnLBC_ItemClick(object sender, ItemClickEventArgs e) { XuLyGiaoDien.ExportExcel(GCKQT, GVKQT, string.Format("SoSanhVeThuong-{0}-{1}", _NCCO.Ten, DateTime.Now.ToString("dd-MM-yyy"))); XuLyGiaoDien.ExportExcel(GCKQH, GVKQH, string.Format("SoSanhVeHoan-{0}-{1}", _NCCO.Ten, DateTime.Now.ToString("dd-MM-yyy"))); }
private void btnXuat_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { XuLyGiaoDien.ExportExcel(GCCTNH, GVCTNH, "ExNH-" + DateTime.Now.ToString("dd-MM-yyy")); }