private void PrintReport() { try { DataTable dtData; string reportName = "APQPReport"; if (!PartNo.IsNotNullOrEmpty()) { ShowInformationMessage(PDMsg.NotEmpty("Part No")); return; } dtData = DvAPQP.ToTable().Copy(); //dtData.Rows.Clear(); DataSet dsReport = new DataSet(); dsReport.DataSetName = "DSAPQPDATA"; //dtData.Rows.Clear(); dsReport.Namespace = "APQP"; dtData.TableName = "APQP"; dsReport.Tables.Add(dtData); //dsReport.WriteXml("E:\\APQP.xml", XmlWriteMode.WriteSchema); Dictionary <string, string> dictFormula = new Dictionary <string, string>(); dictFormula.Add("PartNo", "SFL Part No : " + PartNo); frmReportViewer reportViewer = new frmReportViewer(dsReport, reportName, CrystalDecisions.Shared.ExportFormatType.NoFormat, dictFormula); if (!reportViewer.ReadyToShowReport) { return; } reportViewer.ShowDialog(); } catch (Exception ex) { throw ex.LogException(); } }
private void Save() { try { if (!PartNo.IsNotNullOrEmpty()) { ShowInformationMessage(PDMsg.NotEmpty("Part No")); return; } PartNumberIsFocused = true; Mouse.OverrideCursor = Cursors.Wait; DvAPQP.ToTable().AcceptChanges(); if (_aPQPBll.Save(DvAPQP.ToTable().Copy(), PartNo) == true) { Mouse.OverrideCursor = null; ShowInformationMessage(PDMsg.UpdatedSuccessfully); // ClearAll(); } } catch (Exception ex) { throw ex.LogException(); } finally { Mouse.OverrideCursor = null; } }