private void barBtnXuatBaoCao_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (Object.Equals(objPhong, null)) { XtraMessageBox.Show("Chưa chọn phòng!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (Object.Equals(objPhong.id, Guid.Empty)) { XtraMessageBox.Show("Chưa chọn phòng!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } String strViTri = "[Không Rõ]"; if (!Object.Equals(objPhong.vitri, null)) strViTri = objPhong.vitri.coso != null ? objPhong.vitri.coso.ten + (objPhong.vitri.day != null ? " - " + objPhong.vitri.day.ten + (objPhong.vitri.tang != null ? " - " + objPhong.vitri.tang.ten : "") : "") : ""; if (Object.Equals(listCTThietBis, null)) { XtraMessageBox.Show(String.Format("Phòng {0} ({1}) chưa có thiết bị!", objPhong.ten, strViTri), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } else { if (listCTThietBis.Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::PTB_GUI.WaitForm1), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReport_Template _XtraReport_Template = new XtraReport_Template(SHARED.Libraries.ReportHelper.FillDatasetFromGrid(gridViewCTThietBi), gridViewCTThietBi, barCheckItemLandscape.Checked); _XtraReport_Template.SetTitleText(String.Format("Danh Sách Thiết Bị Tại Phòng: {0} ({1})", objPhong.ten, strViTri)); if (barCheckItemThietKe.Checked) { ReportDesignTool designTool = new ReportDesignTool(_XtraReport_Template); splashScreenManager_Report.CloseWaitForm(); designTool.ShowDesignerDialog(); ReportPrintTool printTool = new ReportPrintTool(designTool.Report); printTool.ShowPreviewDialog(); } else { ReportPrintTool printTool = new ReportPrintTool(_XtraReport_Template); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show(String.Format("Phòng {0} ({1}) chưa có thiết bị!", objPhong.ten, strViTri), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void barBtnXuatBaoCao_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (Object.Equals(_ViTriHienTai, null)) { XtraMessageBox.Show("Chưa chọn vị trí!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (Object.Equals(listPhong, null)) { XtraMessageBox.Show("Không có phòng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } else { String strViTri = _ViTriHienTai.coso != null ? _ViTriHienTai.coso.ten + (_ViTriHienTai.day != null ? " - " + _ViTriHienTai.day.ten + (_ViTriHienTai.tang != null ? " - " + _ViTriHienTai.tang.ten : "") : "") : ""; if (listPhong.Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::PTB_GUI.WaitForm1), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReport_Template _XtraReport_Template = new XtraReport_Template(SHARED.Libraries.ReportHelper.FillDatasetFromGrid(gridViewPhong), gridViewPhong, barCheckItemLandscape.Checked); _XtraReport_Template.SetTitleText("Danh Sách Phòng Tại: " + strViTri); if (barCheckItemThietKe.Checked) { ReportDesignTool designTool = new ReportDesignTool(_XtraReport_Template); splashScreenManager_Report.CloseWaitForm(); designTool.ShowDesignerDialog(); ReportPrintTool printTool = new ReportPrintTool(designTool.Report); printTool.ShowPreviewDialog(); } else { ReportPrintTool printTool = new ReportPrintTool(_XtraReport_Template); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { strViTri = "[" + strViTri + "]"; XtraMessageBox.Show(strViTri + " không có phòng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void btnSave_Click(object sender, EventArgs e) { splashScreenManager1.ShowWaitForm(); try { if (_ischanginglogin) { ChangeLogin(); MessageBox.Show("Логин был изменен"); } else { ChangePassword(); MessageBox.Show("Пароль был изменен"); } this.DialogResult = DialogResult.OK; } catch (Exception ex) { MessageBox.Show(String.Format(ex.Message), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { splashScreenManager1.CloseWaitForm(); } }
private void barBtnXuatBaoCao_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (Object.Equals(NhanVienPTs, null)) { XtraMessageBox.Show("Chưa có nhân viên phụ trách", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (NhanVienPTs.Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::PTB_GUI.WaitForm1), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReport_Template _XtraReport_Template = new XtraReport_Template(SHARED.Libraries.ReportHelper.FillDatasetFromGrid(gridViewNhanVien), gridViewNhanVien, barCheckItemLandscape.Checked, false); _XtraReport_Template.SetTitleText("Danh Sách Nhân Viên Phụ Trách"); if (barCheckItemThietKe.Checked) { ReportDesignTool designTool = new ReportDesignTool(_XtraReport_Template); splashScreenManager_Report.CloseWaitForm(); designTool.ShowDesignerDialog(); ReportPrintTool printTool = new ReportPrintTool(designTool.Report); printTool.ShowPreviewDialog(); } else { ReportPrintTool printTool = new ReportPrintTool(_XtraReport_Template); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có nhân viên phụ trách", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static void iWaitForm(this DevExpress.XtraSplashScreen.SplashScreenManager spmg) { if (spmg.IsSplashFormVisible) { spmg.CloseWaitForm(); } else { spmg.ShowWaitForm(); } }
private void wizardControl1_SelectedPageChanged(object sender, WizardPageChangedEventArgs e) { if (e.Page == pageCreateDatabase) { Splash = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(Waiting.Wait), true, true); Splash.WaitForSplashFormClose(); if (!Splash.IsSplashFormVisible) { Splash.ShowWaitForm(); } do_SQLSettings(); if (DataBaseControl) { e.Page.AllowNext = true; do_CreateTable(); if (Splash.IsSplashFormVisible) { Splash.CloseWaitForm(); } } else { e.Page.AllowNext = false; do_CreateDatabese(); if (Splash.IsSplashFormVisible) { Splash.CloseWaitForm(); } } } if (e.Page == pageLisansDemo) { dt_RecordDate.EditValue = DateTime.Now; } }
public void CloseWaitForm() { try { if (SplashManager.IsSplashFormVisible) { SplashManager.CloseWaitForm(); } } catch (Exception ex) { if (CDS.Shared.Exception.UserInterfaceExceptionHandler.HandleException(ref ex)) { throw ex; } } }
private void btnSave_Click(object sender, EventArgs e) { splashScreenManager1.ShowWaitForm(); try { ImportOrder(); MessageBox.Show("Заявка была импортирована"); this.DialogResult = DialogResult.OK; } catch (Exception ex) { MessageBox.Show(String.Format(ex.Message), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { splashScreenManager1.CloseWaitForm(); } }
private void btnSave_Click(object sender, EventArgs e) { var agencyReportRequest = new AgencyReportRequest(); agencyReportRequest.ServiceType = "flights"; agencyReportRequest.OrganizationCode = _orgcode; agencyReportRequest.BeginDate = calFrom.DateTime; agencyReportRequest.EndDate = calTo.DateTime; splashScreenManager1.ShowWaitForm(); try { DataProcessor.CreateReport(null, cbFormat.EditValue.ToString(), null, "agentreport", agencyReportRequest); } finally { splashScreenManager1.CloseWaitForm(); } this.DialogResult = DialogResult.OK; }
public void Dispose() { SplashScreenManager.CloseWaitForm(); }
private void barButtonItemXuatThongKe_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (current.Equals(_ucTKPhong)) { if (Object.Equals(_ucTKPhong.gridControlPhong.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List <Phong_ThongKe>)_ucTKPhong.gridControlPhong.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKPhong.gridControlPhong, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Phòng"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKTaiSan)) { if (Object.Equals(_ucTKTaiSan.gridControlTaiSan.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List <TaiSan_ThongKe>)_ucTKTaiSan.gridControlTaiSan.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKTaiSan.gridControlTaiSan, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Tài Sản"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKHaoMon)) { if (Object.Equals(_ucTKHaoMon.gridControlHaoMon.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List <TaiSanHienThi>)_ucTKHaoMon.gridControlHaoMon.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKHaoMon.gridControlHaoMon, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Hao Mòn"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKTHPhong)) { if (Object.Equals(_ucTKTHPhong.gridControlPhong.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List <Phong_ThongKe>)_ucTKTHPhong.gridControlPhong.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKTHPhong.gridControlPhong, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Tổng Hợp Phòng"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKTHTaiSan)) { if (Object.Equals(_ucTKTHTaiSan.gridControlTaiSan.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List <TaiSanHienThi>)_ucTKTHTaiSan.gridControlTaiSan.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKTHTaiSan.gridControlTaiSan, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Tổng Hợp Tài Sản"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void do_FirstRecord() { if (Convert.ToString(txtKullaniciAdi.EditValue) == "") { XtraMessageBox.Show("Kullanıcı Adı Giriniz."); return; } if (Convert.ToString(txtUserParola.EditValue) == "") { XtraMessageBox.Show("Parola Giriniz."); return; } if (Convert.ToString(txtSirketAdi.EditValue) == "") { XtraMessageBox.Show("Şirket Adı Giriniz."); return; } if (Convert.ToString(txtDepotAdi.EditValue) == "") { XtraMessageBox.Show("Depo Adı Giriniz."); return; } try { Splash = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(Waiting.Wait), true, true); Splash.WaitForSplashFormClose(); if (!Splash.IsSplashFormVisible) { Splash.ShowWaitForm(); } SqlCommand sCommand = SqlCreateCommandFront(SqlConnectionString); sCommand.CommandText = "SELECT [TableName] = so.name FROM sysobjects so WHERE so.xtype = 'U' GROUP BY so.name "; DataTable tblTableList = ExecuteSelectCommand(sCommand); DataColumn[] KeysTableList = new DataColumn[1]; KeysTableList[0] = tblTableList.Columns["TableName"]; tblTableList.PrimaryKey = KeysTableList; #region Users if (tblTableList.Rows.Contains("Users") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[Users]( " + " [id][int] IDENTITY(1, 1) NOT NULL, " + " [username] [nvarchar] (50) NOT NULL, " + " [password] [nvarchar] (50) NULL, " + " [note] [text] NULL, " + " [date] [datetime] NULL, " + " [Active] [bit] NULL, " + " [HaspPassword] [nvarchar] (50) NULL, " + " [Email] [nvarchar] (50) NULL, " + " [DefaultTheme] " + " [nvarchar] " + " (max) NULL, " + " [DefaultTheme2] [nvarchar] " + " (max) NULL, " + " [AdminAuthority] [bit] NULL, " + " [ReportPrint][bit] NULL, " + " [ExportExcelPdf] [bit] NULL, " + " [DailyEndOperation] [bit] NULL, " + " [EnvanterEntry] [bit] NULL, " + " [VeresiyeDefterClosed] [bit] NULL, " + " CONSTRAINT[PK_users] PRIMARY KEY CLUSTERED " + " ( " + " [username] ASC " + " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + " ) ON[PRIMARY] TEXTIMAGE_ON[PRIMARY]"; ExecuteNonQuery(sCommand); } sCommand.CommandText = "INSERT INTO [dbo].[Users] " + " ([username] " + " ,[password] " + " ,[date] " + " ,[Active] " + " ,[HaspPassword]) " + " VALUES " + " ('Admin' " + " ,@Password " + " ,@date " + " ,'True' " + " ,@HashPassword)"; sCommand.Parameters.Clear(); sCommand.Parameters.Add("Password", SqlDbType.NVarChar).Value = SecurityExtension.Sifrele("c4e128b141aFb"); sCommand.Parameters.Add("date", SqlDbType.DateTime).Value = DateTime.Now; sCommand.Parameters.Add("HashPassword", SqlDbType.NVarChar).Value = SecurityExtension.ConvertStringToMD5("c4e128b141aFb"); ExecuteNonQuery(sCommand); sCommand.CommandText = "INSERT INTO [dbo].[Users] " + " ([username] " + " ,[password] " + " ,[date] " + " ,[Active] " + " ,[HaspPassword]) " + " VALUES " + " (@userName " + " ,@Password " + " ,@date " + " ,'True' " + " ,@HashPassword)"; sCommand.Parameters.Clear(); sCommand.Parameters.Add("userName", SqlDbType.NVarChar).Value = txtKullaniciAdi.EditValue; sCommand.Parameters.Add("Password", SqlDbType.NVarChar).Value = SecurityExtension.Sifrele(txtUserParola.EditValue.ToString()); sCommand.Parameters.Add("date", SqlDbType.DateTime).Value = DateTime.Now; sCommand.Parameters.Add("HashPassword", SqlDbType.NVarChar).Value = SecurityExtension.ConvertStringToMD5(txtUserParola.EditValue.ToString()); ExecuteNonQuery(sCommand); #endregion #region Company if (tblTableList.Rows.Contains("Company") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[Company]( " + " [RecId][int] IDENTITY(1, 1) NOT NULL, " + " [CompanyCode] [nvarchar] (50) NULL, " + " [CompanyName] [nvarchar] (50) NULL, " + " [Logo] [image] NULL, " + " [Adress1] [nvarchar] (50) NULL, " + " [Adress2] [nvarchar] (50) NULL, " + " [BulvarCadde] [nvarchar] (50) NULL, " + " [TelNo] [int] NULL, " + " [BinaAdi] [nvarchar] (50) NULL, " + " [BinaNo] [nvarchar] (50) NULL, " + " [MahalleSemt] [nvarchar] (50) NULL, " + " [Sehir] [nvarchar] (50) NULL, " + " [PostaKodu] [int] NULL, " + " [Ulke] [nvarchar] (50) NULL, " + " CONSTRAINT[PK_Company] PRIMARY KEY CLUSTERED " + " ( " + " [RecId] ASC " + " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + " ) ON[PRIMARY] TEXTIMAGE_ON[PRIMARY]"; ExecuteNonQuery(sCommand); } sCommand.CommandText = "INSERT INTO [dbo].[Company] ([CompanyCode], [CompanyName]) VALUES ('001', @companyName);SELECT SCOPE_IDENTITY();"; sCommand.Parameters.Clear(); sCommand.Parameters.Add("companyName", SqlDbType.NVarChar).Value = txtSirketAdi.EditValue; int CompanyRecId = Convert.ToInt32(ExecuteScalar(sCommand)); //ExecuteNonQuery(sCommand); #endregion #region Depo if (tblTableList.Rows.Contains("Depot") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[Depot]( " + " [DID][int] IDENTITY(1, 1) NOT NULL, " + " [DepName] [nvarchar] (50) NULL, " + " [DepAddress] [nvarchar] (50) NULL, " + " [DepDistrict] [nvarchar] (50) NULL, " + " [DepCity] [nvarchar] (50) NULL, " + " [DepAuthPerson] [nvarchar] (50) NULL, " + " [DepPhoneOne] [nvarchar] (50) NULL, " + " [DepPhoneTwo] [nvarchar] (50) NULL, " + " [DepTaxAdministration] [nvarchar] (50) NULL, " + " [DepTaxNo] [nvarchar] (50) NULL, " + " [DepActive] [bit] NULL, " + " [DepDate] [datetime] NULL, " + " [CompanyRecId] [int] NULL, " + " CONSTRAINT[PK_Depot] PRIMARY KEY CLUSTERED " + " ( " + " [DID] ASC " + " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + " ) ON[PRIMARY]"; ExecuteNonQuery(sCommand); } sCommand.CommandText = "INSERT INTO [dbo].[Depot] ([DepName],[CompanyRecId]) VALUES (@DepName, @CompanyRecId)"; sCommand.Parameters.Clear(); sCommand.Parameters.Add("DepName", SqlDbType.NVarChar).Value = txtDepotAdi.EditValue; sCommand.Parameters.Add("CompanyRecId", SqlDbType.Int).Value = CompanyRecId; ExecuteNonQuery(sCommand); #endregion #region ApplicatonServer if (tblTableList.Rows.Contains("ApplicationServer") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[ApplicationServer]( " + " [Id][int] IDENTITY(1, 1) NOT NULL, " + " " + " [Server] [nvarchar] " + " (max) NULL, " + " " + " [ServerName] [nvarchar] " + " (max) NULL, " + " " + " [UserName] [nvarchar] (200) NULL, " + " [Password] " + " [nvarchar] " + " (max) NULL, " + " " + " [DataBase] [nvarchar] (50) NULL, " + " CONSTRAINT[PK_ApplicationServer] PRIMARY KEY CLUSTERED " + " ( " + " [Id] ASC " + " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + " ) ON[PRIMARY] TEXTIMAGE_ON[PRIMARY]"; ExecuteNonQuery(sCommand); } string[] conArry; conArry = SqlConnectionString.Split(';'); List <string> conn = new List <string>(); foreach (var item in conArry) { int position = item.IndexOf("="); if (position < 0) { continue; } conn.Add(item.Substring(position + 1)); } if (SqlLocal) { sCommand.CommandText = "INSERT INTO [dbo].[ApplicationServer] " + " ([Server] " + " ,[ServerName] " + " ,[UserName] " + " ,[Password] " + " ,[DataBase])" + " VALUES " + " (@server " + " ,@serverName " + " ,'' " + " ,'' , @DataBase)"; sCommand.Parameters.Clear(); sCommand.Parameters.Add("server", SqlDbType.NVarChar).Value = "(localdb)\\MSSQLLocalDB"; sCommand.Parameters.Add("serverName", SqlDbType.NVarChar).Value = "SQLLocal"; sCommand.Parameters.Add("DataBase", SqlDbType.NVarChar).Value = "Msp"; ExecuteNonQuery(sCommand); } else { //sCommand.CommandText = "INSERT INTO [dbo].[ApplicationServer] " // + " ([Server] " // + " ,[ServerName] " // + " ,[UserName] " // + " ,[Password] " // + " ,[DataBase])" // + " VALUES " // + " (@server " // + " ,@serverName " // + " ,'' " // + " ,'' , @DataBase)"; //sCommand.Parameters.Clear(); //sCommand.Parameters.Add("server", SqlDbType.NVarChar).Value = "(localdb)\\MSSQLLocalDB"; //sCommand.Parameters.Add("serverName", SqlDbType.NVarChar).Value = "SQLLocal"; //sCommand.Parameters.Add("DataBase", SqlDbType.NVarChar).Value = "Msp"; //ExecuteNonQuery(sCommand); } #endregion #region Parameter if (tblTableList.Rows.Contains("Parameters") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[Parameters]( " + " [RecId][int] IDENTITY(1, 1) NOT NULL, " + " [NumaratorShow] [bit] NULL, " + " [SaleApproval] [bit] NULL, " + " [SaleOutOfStock] [bit] NULL, " + " [SaleCahnge] [bit] NULL, " + " [SaleInformationSlip] [bit] NULL, " + " [MainSaleForm] [bit] NULL, " + " [AutoCurrency] [bit] NULL, " + " [UserRecordMy] [bit] NULL, " + " [PaymentLock] [bit] NULL, " + " [PaymentyForced] [bit] NULL, " + " [SaleNewRecord] [bit] NULL, " + " [SaleProductEndDate] [bit] NULL, " + " [ProductEndDateDay] [int] NULL, " + " CONSTRAINT[PK_Parameters] PRIMARY KEY CLUSTERED " + " ( " + " [RecId] ASC " + " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + " ) ON[PRIMARY]"; ExecuteNonQuery(sCommand); } sCommand.CommandText = "INSERT INTO [dbo].[Parameters] " + " ([NumaratorShow] " + " ,[SaleApproval] " + " ,[SaleOutOfStock] " + " ,[SaleCahnge] " + " ,[SaleInformationSlip] " + " ,[MainSaleForm] " + " ,[AutoCurrency] " + " ,[UserRecordMy] " + " ,[PaymentLock] " + " ,[PaymentyForced] " + " ,[SaleNewRecord] " + " ,[SaleProductEndDate] " + " ,[ProductEndDateDay]) " + " VALUES " + " ('True' " + " ,'False' " + " ,'False' " + " ,'False' " + " ,'False' " + " ,'False' " + " ,'False' " + " ,'False' " + " ,'False' " + " ,'True' " + " ,'True' " + " ,'False' " + " ,10)"; sCommand.Parameters.Clear(); ExecuteNonQuery(sCommand); #endregion #region Currency if (tblTableList.Rows.Contains("CurrencyType") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[CurrencyType]( " + " [RecId][int] IDENTITY(1, 1) NOT NULL, " + " [CurrencyCode] [varchar] (3) NOT NULL, " + " [Remark] [varchar] (50) NULL, " + " [CompanyRecId] [int] NULL, " + " CONSTRAINT[PK_CurrencyType] PRIMARY KEY CLUSTERED " + "( " + " [CurrencyCode] ASC " + ")WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + ") ON[PRIMARY]"; ExecuteNonQuery(sCommand); } sCommand.CommandText = "INSERT INTO [dbo].[CurrencyType] ([CurrencyCode],[Remark],[CompanyRecId]) VALUES ('TL','TL',@CompanyRecId) "; sCommand.Parameters.Clear(); sCommand.Parameters.Add("CompanyRecId", SqlDbType.Int).Value = CompanyRecId; ExecuteNonQuery(sCommand); sCommand.CommandText = "INSERT INTO [dbo].[CurrencyType] ([CurrencyCode],[Remark],[CompanyRecId]) VALUES ('USD','USD',@CompanyRecId) "; sCommand.Parameters.Clear(); sCommand.Parameters.Add("CompanyRecId", SqlDbType.Int).Value = CompanyRecId; ExecuteNonQuery(sCommand); #endregion #region ProgramsControl if (tblTableList.Rows.Contains("ProgramsControl") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[ProgramsControl]( " + " [RecId][int] IDENTITY(1, 1) NOT NULL, " + " [MspVersion] [nvarchar] (50) NULL, " + " [Licence] [nvarchar] (50) NULL, " + " [FirstDate] [datetime] NULL, " + " [MacAdress] [nvarchar] (50) NULL, " + " [IpAdress] [nvarchar] (50) NULL, " + " [LocalIpAdress] [nvarchar] (50) NULL, " + " [IsDemo] [bit] NULL, " + " CONSTRAINT[PK_ProgramsControl] PRIMARY KEY CLUSTERED " + " ( " + " [RecId] ASC " + " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + " ) ON[PRIMARY]"; ExecuteNonQuery(sCommand); } sCommand.CommandText = "INSERT INTO [dbo].[ProgramsControl]([MspVersion],[Licence],[FirstDate],[IsDemo]) VALUES ('1.0.0.0','',@date,@Demo)"; sCommand.Parameters.Clear(); sCommand.Parameters.Add("Demo", SqlDbType.Bit).Value = IsDemo; sCommand.Parameters.Add("date", SqlDbType.DateTime).Value = dt_RecordDate.DateTime; //sCommand.Parameters.Add("MacAdress", SqlDbType.NVarChar).Value = AppMain.MAcAdress; //sCommand.Parameters.Add("IpAdress", SqlDbType.NVarChar).Value = AppMain.IpAdress; //sCommand.Parameters.Add("LocalIp", SqlDbType.NVarChar).Value = AppMain.LocalIpAdress; ExecuteNonQuery(sCommand); #endregion #region PaymentType if (tblTableList.Rows.Contains("PaymentType") == false) { sCommand.CommandText = "CREATE TABLE [dbo].[PaymentType]( " + " [RecId][int] IDENTITY(1, 1) NOT NULL, " + " [Remark] [nvarchar] (50) NULL, " + " CONSTRAINT[PK_PaymentType] PRIMARY KEY CLUSTERED " + " ( " + " [RecId] ASC " + " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " + " ) ON[PRIMARY]"; ExecuteNonQuery(sCommand); } sCommand.CommandText = "INSERT INTO [dbo].[PaymentType] ([Remark]) VALUES ('Nakit')"; sCommand.Parameters.Clear(); ExecuteNonQuery(sCommand); sCommand.CommandText = "INSERT INTO [dbo].[PaymentType] ([Remark]) VALUES ('Pos')"; sCommand.Parameters.Clear(); ExecuteNonQuery(sCommand); sCommand.CommandText = "INSERT INTO [dbo].[PaymentType] ([Remark]) VALUES ('Pos & Nakit')"; sCommand.Parameters.Clear(); ExecuteNonQuery(sCommand); #endregion } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } finally { if (Splash.IsSplashFormVisible) { Splash.CloseWaitForm(); } string path = @"C:\Msp\ConnectString.txt"; if (!File.Exists(path)) { using (StreamWriter sw = File.CreateText(path)) { string sifrele = SecurityExtension.Sifrele(SqlConnectionString); sw.WriteLine(sifrele); } } pageLisansDemo.AllowNext = true; } }
public void closeWaitForm(DevExpress.XtraSplashScreen.SplashScreenManager ssm) { ssm.CloseWaitForm(); }
public FormTaskMain(Task _task, [Optional] DevExpress.XtraSplashScreen.SplashScreenManager splashscreenmanager) { InitializeComponent(); scrollableControl = xtraScrollableControl1; Baza = new AbacusSUPEntities(); //this.IsMdiContainer = true; task = Baza.Task.First(qq => qq.id_task == _task.id_task); if (task == null) { MessageBox.Show("Neki problem sa taskom."); this.Close(); } this.Text += " - " + task.naslov.ToString(); gridControl1.DataSource = Baza.Komentar.Where(qq => qq.id_task == task.id_task).OrderBy(ww => ww.datum).ToList(); labelControl1.Text = task.id_task.ToString(); memoEdit2.Text = task.opis; labelControl2.Text = "Prioritet: " + task.Prioritet.opis; if (task.Login != null) { labelControl3.Text = "Task otvorio: " + task.Login.username; } else { labelControl3.Text = "Task otvorio: (OBRISAN)"; } labelControl4.Text = "Datum:" + task.datum.ToString(); if (task.status_id == 2) { labelControl6.Visible = true; labelControl6.Text = "Task zatvorio " + task.Login1.username.ToString() + ", " + task.datum_zatv.ToString(); } this.Text = task.naslov; labelControl5.Text = task.naslov; layoutView1.PanModeSwitch(); org_size = richEditControl1.Size; if (task.status_id == 2) { simpleButton2.Text = "Otvori task"; simpleButton3.Enabled = false; } List <VezaLT> listaveza = Baza.VezaLT.Where(qq => qq.id_task == task.id_task).ToList(); List <Login> listaoperatera = new List <Login>(); foreach (VezaLT veza in listaveza) { Login operater = Baza.Login.FirstOrDefault(qq => qq.id == veza.id_login); listaoperatera.Add(operater); } string[] fajlovi = null; //if (Directory.Exists(Application.StartupPath + "\\Slike\\" + task.id_task.ToString())) //{ // fajlovi = Directory.GetFiles(Application.StartupPath + "\\Slike\\" + task.id_task.ToString()); // if (fajlovi.Count() > 0) // { // foreach (string file in fajlovi) // { // File.Delete(file); //ako postoje fajlovi od cancelovanih komentara // } // } //} if (splashscreenmanager != null) { splashscreenmanager.CloseWaitForm(); } repositoryItemPictureEdit1.ContextMenuStrip = new ContextMenuStrip(); //da nema right click meni richEditControl1.Options.Behavior.ShowPopupMenu = DocumentCapability.Disabled; #region Fora sa scroll controlom //gridControl1.Location = xtraScrollableControl1.Location; LayoutViewInfo info = layoutView1.GetViewInfo() as LayoutViewInfo; layoutView1.OptionsBehavior.ScrollVisibility = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Never; gridControl1.Size = new Size(xtraScrollableControl1.Width - SystemInformation.VerticalScrollBarWidth, info.CalcRealViewHeight(new Rectangle(0, 0, 300, Int32.MaxValue))); #endregion simpleButtonGitHub.Visible = task.git_id == null ? true : false; gridControl1.MouseWheel += GridControl1_MouseWheel; //CustomRepRichTextEdit testeditor = new CustomRepRichTextEdit(); //testeditor.AllowMouseWheel = false; //gridControl1.RepositoryItems.Add(testeditor); //layoutView1.Columns["UnboundKomentar"].ColumnEdit = testeditor; }
private void barButtonItemXuatThongKe_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { if (current.Equals(_ucTKPhong)) { if (Object.Equals(_ucTKPhong.gridControlPhong.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List<Phong_ThongKe>)_ucTKPhong.gridControlPhong.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKPhong.gridControlPhong, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Phòng"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKTaiSan)) { if (Object.Equals(_ucTKTaiSan.gridControlTaiSan.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List<TaiSan_ThongKe>)_ucTKTaiSan.gridControlTaiSan.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKTaiSan.gridControlTaiSan, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Tài Sản"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKHaoMon)) { if (Object.Equals(_ucTKHaoMon.gridControlHaoMon.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List<TaiSanHienThi>)_ucTKHaoMon.gridControlHaoMon.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKHaoMon.gridControlHaoMon, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Hao Mòn"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKTHPhong)) { if (Object.Equals(_ucTKTHPhong.gridControlPhong.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List<Phong_ThongKe>)_ucTKTHPhong.gridControlPhong.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKTHPhong.gridControlPhong, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Tổng Hợp Phòng"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else if (current.Equals(_ucTKTHTaiSan)) { if (Object.Equals(_ucTKTHTaiSan.gridControlTaiSan.DataSource, null)) { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (((List<TaiSanHienThi>)_ucTKTHTaiSan.gridControlTaiSan.DataSource).Count > 0) { try { DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager_Report = new DevExpress.XtraSplashScreen.SplashScreenManager(this, typeof(global::TSCD_GUI.WaitFormLoad), true, true, DevExpress.XtraSplashScreen.ParentType.UserControl); splashScreenManager_Report.ShowWaitForm(); splashScreenManager_Report.SetWaitFormCaption("Đang tạo report"); splashScreenManager_Report.SetWaitFormDescription("Vui lòng chờ trong giây lát..."); XtraReportTSCD_Grid _XtraReportTSCD_Grid = new XtraReportTSCD_Grid(_ucTKTHTaiSan.gridControlTaiSan, false); _XtraReportTSCD_Grid.SetTextTitle("Thống Kê Tổng Hợp Tài Sản"); _XtraReportTSCD_Grid.SetTextTitle_TopRight(""); ReportPrintTool printTool = new ReportPrintTool(_XtraReportTSCD_Grid); splashScreenManager_Report.CloseWaitForm(); printTool.ShowPreviewDialog(); } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chưa có dữ liệu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } catch { XtraMessageBox.Show("Đã xảy ra lỗi!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }