/// <summary> /// On 'Print' button click for print /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvMonthlySalary.Rows.Count > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblCompany); MonthlySalarySP spMonthlySalary = new MonthlySalarySP(); DataTable dtblMonthlySalary = spMonthlySalary.MonthlySalryViewAllForMonthlySalaryReports(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbDesignation.Text, cmbEmployeeCode.Text, Convert.ToDateTime(dtpSalaryMonth.Value.ToString())); ds.Tables.Add(dtblMonthlySalary); frmReport frmReportObj = new frmReport(); frmReportObj.MdiParent = formMDI.MDIObj; frmReportObj.MonthlySalaryReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("MSR:9" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvDailyAttendanceReport.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblCompany); DailyAttendanceMasterSP spDailyAttendanceMaster = new DailyAttendanceMasterSP(); DataTable dtblAttendance = spDailyAttendanceMaster.DailyAttendanceViewForDailyAttendanceReport(dtpDate.Text.Trim(), cmbStatus.Text.Trim(), cmbEmployee.Text.Trim(), cmbDesignation.Text.Trim()); ds.Tables.Add(dtblAttendance); frmReport frmReportObj = new frmReport(); frmReportObj.MdiParent = formMDI.MDIObj; frmReportObj.DailyAttendanceReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("DAR:8" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click to print /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvSalaryPackage.RowCount > 0) { frmReport frmreport = new frmReport(); DataSet ds = new DataSet(); SalaryPackageSP spSalaryPackage = new SalaryPackageSP(); CompanySP spCompany = new CompanySP(); DataTable dtblSalaryPackage = spSalaryPackage.SalaryPackageViewAllForSalaryPackageReport(cmbPackageName.Text, cmbStatus.Text); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblSalaryPackage); ds.Tables.Add(dtblCompany); frmreport.MdiParent = formMDI.MDIObj; frmreport.SalaryPackageReport(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("SPD:9 " + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click to take print /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvAdvancePayment.Rows.Count > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblCompany); AdvancePaymentSP spAdvancePayment = new AdvancePaymentSP(); DataTable dtblAdvancePayment = new DataTable(); dtblAdvancePayment = spAdvancePayment.AdvancePaymentViewAllForAdvancePaymentReport(dtpFrmDate.Value, dtpToDate.Value, cmbEmployeeCode.Text, DateTime.Parse(dtpSalaryMonth.Text.ToString())); ds.Tables.Add(dtblAdvancePayment); frmReport frmReportObj = new frmReport(); frmReportObj.MdiParent = formMDI.MDIObj; frmReportObj.AdvancePaymentReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("APR:8" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On print button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { DateTime FromDate = this.dtpFromDate.Value; DateTime ToDate = this.dtpToDate.Value; DataSet ds = new DataSet(); CompanySP spcompany = new CompanySP(); DataTable dtblProduct = dtbl.Copy(); DataTable dtblCompany = spcompany.CompanyViewDataTable(1); if (dgvProductBatch.Rows.Count > 0) { DataTable dtblNew = dtbl.Copy(); ds.Tables.Add(dtblCompany); ds.Tables.Add(dtblProduct); frmReport frmRepor = new frmReport(); frmRepor.MdiParent = formMDI.MDIObj; frmRepor.ProductBatchReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show(" PVSBR:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Print button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click_1(object sender, EventArgs e) { try { PhysicalStockMasterSP spPhysicalStockMaster = new PhysicalStockMasterSP(); if (dgvPhysicalStockReport.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); frmReport reportobj = new frmReport(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); DataTable dtblPhysicalStockReport = spPhysicalStockMaster.PhysicalStockReportFill(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), txtVoucherNo.Text.Trim(), txtProductName.Text.Trim(), Convert.ToDecimal(cmbProductCode.SelectedValue), Convert.ToDecimal(cmbVoucherType.SelectedValue)); ds.Tables.Add(dtblCompany); ds.Tables.Add(dtblPhysicalStockReport); reportobj.MdiParent = formMDI.MDIObj; reportobj.PhysicalStockReport(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("PSRT:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// on "print' button click for print /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvServiceReport.RowCount > 0) { DataSet dsServiceVoucherReport = new DataSet(); CompanySP spCompany = new CompanySP(); frmReport reportobj = new frmReport(); ServiceMasterSP spServiceMaster = new ServiceMasterSP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); DataTable dtblServiceVoucherReport = spServiceMaster.ServiceReport(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbVoucherType.Text, cmbCashOrParty.Text, cmbSalesman.Text); dsServiceVoucherReport.Tables.Add(dtblCompany); dsServiceVoucherReport.Tables.Add(dtblServiceVoucherReport); reportobj.MdiParent = formMDI.MDIObj; reportobj.ServiceVoucherReport(dsServiceVoucherReport); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("SVRT 15 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click to print /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvPayHead.RowCount > 0) { DataSet ds = new DataSet(); PayHeadSP spPayHead = new PayHeadSP(); DataTable dtbl = spPayHead.PayHeadViewAllForPayHeadReport(cmbPayHead.Text, cmbType.Text); CompanySP spCompany = new CompanySP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); frmReport frmreport = new frmReport(); frmreport.MdiParent = formMDI.MDIObj; ds.Tables.Add(dtbl); ds.Tables.Add(dtblCompany); frmreport.PayHeadReport(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("PHR:7 " + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click to take print /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvEmployee.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblCompany); EmployeeSP spEmployee = new EmployeeSP(); DataTable dtblEmployee = spEmployee.EmployeeViewAllEmployeeReport(cmbDesigantion.Text, cmbEmployee.Text, cmbStatus.Text); ds.Tables.Add(dtblEmployee); frmReport frmReportObj = new frmReport(); frmReportObj.MdiParent = formMDI.MDIObj; frmReportObj.EmployeeReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("ER9" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvContraReport.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); frmReport reportobj = new frmReport(); ContraMasterSP spContraMaster = new ContraMasterSP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); DataTable dtblCotraReport = spContraMaster.ContraReport(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbVoucherType.Text, cmbCashOrBank.Text, strType); ds.Tables.Add(dtblCompany); ds.Tables.Add(dtblCotraReport); reportobj.MdiParent = formMDI.MDIObj; reportobj.ContraVoucherReport(ds); } else { MessageBox.Show("No data found", "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("CRT:12" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to save the items to database /// </summary> public void SaveFunction() { try { decimal decIdentity = 0; FinancialYearInfo infoFinancialYear = new FinancialYearInfo(); FinancialYearSP spFinancialYear = new FinancialYearSP(); CompanySP spCompany = new CompanySP(); infoFinancialYear.FromDate = Convert.ToDateTime(txtFromDate.Text); infoFinancialYear.ToDate = Convert.ToDateTime(txtToDate.Text); infoFinancialYear.ExtraDate = System.DateTime.Now; infoFinancialYear.Extra1 = string.Empty; infoFinancialYear.Extra2 = string.Empty; decIdentity = spFinancialYear.FinancialYearAddWithReturnIdentity(infoFinancialYear); infoFinancialYear = spFinancialYear.FinancialYearView(decIdentity); PublicVariables._decCurrentFinancialYearId = infoFinancialYear.FinancialYearId; PublicVariables._dtFromDate = infoFinancialYear.FromDate; PublicVariables._dtToDate = infoFinancialYear.ToDate; PublicVariables._dtCurrentDate = infoFinancialYear.FromDate; spCompany.CompanyCurrentDateEdit(PublicVariables._dtCurrentDate); formMDI.MDIObj.ShowCurrentDate(); isSave = true; this.Close(); } catch (Exception ex) { MessageBox.Show("NFY 2 : " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click to print the data /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvPurchaseReturnReport.Rows.Count > 0) { if (dgvPurchaseReturnReport.Rows.Count > 0) { DataSet dsPurchaseReturnReport = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblGrid = dtblReg.Copy(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); dsPurchaseReturnReport.Tables.Add(dtblGrid); dsPurchaseReturnReport.Tables.Add(dtblCompany); frmReport frmRepor = new frmReport(); frmRepor.MdiParent = formMDI.MDIObj; frmRepor.PurchaseReturnReportPrinting(dsPurchaseReturnReport, txtTotalAmount.Text); } } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("PRRT:13" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// To set the from date and todate in the curresponding feilds /// </summary> public void FinancialYearDate() { try { dtpFromDate.MinDate = PublicVariables._dtFromDate; dtpFromDate.MaxDate = PublicVariables._dtToDate; CompanyInfo infoComapany = new CompanyInfo(); CompanySP spCompany = new CompanySP(); infoComapany = spCompany.CompanyView(1); DateTime dtFromDate = infoComapany.CurrentDate; dtpFromDate.Value = dtFromDate; dtpFromDate.Text = dtFromDate.ToString("dd-MMM-yyyy"); dtpFromDate.Value = Convert.ToDateTime(txtFromDate.Text); txtFromDate.Focus(); txtFromDate.SelectAll(); dtpToDate.MinDate = PublicVariables._dtFromDate; dtpToDate.MaxDate = PublicVariables._dtToDate; infoComapany = spCompany.CompanyView(1); DateTime dtToDate = infoComapany.CurrentDate; dtpToDate.Value = dtToDate; dtpToDate.Text = dtToDate.ToString("dd-MMM-yyyy"); dtpToDate.Value = Convert.ToDateTime(txtToDate.Text); txtToDate.Focus(); txtToDate.SelectAll(); } catch (Exception ex) { MessageBox.Show("DRNTREP4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvBonusDeductionReport.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblCompany); BonusDedutionSP spBonusDeduction = new BonusDedutionSP(); DataTable dtblBonusDeduction = spBonusDeduction.BonusDeductionReportGridFill(dtpFromDate.Text, dtpToDate.Text, dtpSalaryMonth.Text, cmbDesignation.Text, cmbEmployee.Text, strBonusOrDeduction); ds.Tables.Add(dtblBonusDeduction); frmReport frmReportObj = new frmReport(); frmReportObj.MdiParent = formMDI.MDIObj; frmReportObj.BonusDeductionReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("BDR:8" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// On 'Print' button click to print /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvDailySalary.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblEmployee = spEmployee.EmployeeViewAllForDailySalaryReport(cmbEmployeeCode.Text, cmbDesignation.Text, Convert.ToDateTime(dtpFromDate.Text.ToString()), Convert.ToDateTime(dtpToDate.Text.ToString()), cmbStatus.Text); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblCompany); ds.Tables.Add(dtblEmployee); frmReport frmReportObj = new frmReport(); frmReportObj.MdiParent = formMDI.MDIObj; frmReportObj.DailySalaryReport(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show("DSR9 " + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Start a login /// </summary> public void Login() { try { UserSP spUser = new UserSP(); CompanySP spCompany = new CompanySP(); CompanyInfo infoCompany = new CompanyInfo(); string strUserName = txtUserName.Text.Trim(); string strPassword = spUser.LoginCheck(strUserName); if (strPassword == txtPassword.Text.Trim() && strPassword != string.Empty) { int inUserId = spUser.GetUserIdAfterLogin(strUserName, strPassword); PublicVariables._decCurrentUserId = inUserId; infoCompany = spCompany.CompanyView(1); PublicVariables._decCurrencyId = infoCompany.CurrencyId; formMDI.MDIObj.CallFromLogin(); SettingsCheck(); //for Quock Launch menu formMDI.MDIObj.ShowQuickLaunchMenu(); formMDI.MDIObj.CurrentSettings(); //Display ChangeCurrentDate form// frmChangeCurrentDate frmCurrentDateChangeObj = new frmChangeCurrentDate(); frmCurrentDateChangeObj.MdiParent = formMDI.MDIObj; frmCurrentDateChangeObj.CallFromLogin(this); formMDI.MDIObj.Text = "OpenMiracle " + infoCompany.CompanyName + " [ " + PublicVariables._dtFromDate.ToString("dd-MMM-yyyy") + " To " + PublicVariables._dtToDate.ToString("dd-MMM-yyyy") + " ]"; // For showing the OpenMiracle message from the website formMDI.MDIObj.logoutToolStripMenuItem.Enabled = true; if (PublicVariables.MessageToShow != string.Empty) { frmMessage frmMsg = new frmMessage(); frmMsg.lblHeading.Text = PublicVariables.MessageHeadear; frmMsg.lblMessage.Text = PublicVariables.MessageToShow; frmMsg.MdiParent = formMDI.MDIObj; frmMsg.Show(); frmMsg.Location = new Point(0, formMDI.MDIObj.Height - 270); foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(frmChangeCurrentDate)) { form.Focus(); } } } } else { Messages.InformationMessage("Invalid username or password"); Clear(); } } catch (Exception ex) { MessageBox.Show("LOGIN02:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void CompanyCurrentDateEdit(DateTime dtCurrentDate) { CompanySP spCompany = new CompanySP(); try { spCompany.CompanyCurrentDateEdit(dtCurrentDate); } catch (Exception ex) { MessageBox.Show("CB:10" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void CompanyDelete(decimal CompanyId) { CompanySP spCompany = new CompanySP(); try { spCompany.CompanyDelete(CompanyId); } catch (Exception ex) { MessageBox.Show("CB:5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void CompanyEdit(CompanyInfo infoCompany) { CompanySP spCompany = new CompanySP(); try { spCompany.CompanyEdit(infoCompany); } catch (Exception ex) { MessageBox.Show("CB:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Datagridview /// </summary> public void CompanyGridFill() { try { DataTable dtbl = new DataTable(); CompanySP spComapny = new CompanySP(); dtbl = spComapny.CompanyViewAllForSelectCompany(); dgvSelectCompany.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("SELCMPNY : 1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public int CompanyCount() { CompanySP spCompany = new CompanySP(); int inCount = 0; try { inCount = spCompany.CompanyCount(); } catch (Exception ex) { MessageBox.Show("CB:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(inCount); }
public List <DataTable> CompanyViewAll() { CompanySP spCompany = new CompanySP(); List <DataTable> listObj = new List <DataTable>(); try { listObj = spCompany.CompanyViewAll(); } catch (Exception ex) { MessageBox.Show("CB:8" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }
public decimal CompanyGetIdIfSingleCompany() { CompanySP spCompany = new CompanySP(); decimal decCompanyId = 0; try { decCompanyId = spCompany.CompanyGetIdIfSingleCompany(); } catch (Exception ex) { MessageBox.Show("CB:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(decCompanyId); }
public bool CompanyCheckExistence(String strCompanyName, decimal decCompanyId) { CompanySP spCompany = new CompanySP(); bool isResult = false; try { isResult = spCompany.CompanyCheckExistence(strCompanyName, decCompanyId); } catch (Exception ex) { MessageBox.Show("CB:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(isResult); }
public string StoredProcedureInserter(string strParameter) { CompanySP spCompany = new CompanySP(); string error = ""; try { error = spCompany.StoredProcedureInserter(strParameter); } catch (Exception ex) { MessageBox.Show("CB:10" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(error); }
public decimal CompanyAddParticularFeilds(CompanyInfo infoCompany) { CompanySP spCompany = new CompanySP(); decimal decId = 0; try { decId = spCompany.CompanyAddParticularFeilds(infoCompany); } catch (Exception ex) { MessageBox.Show("CB:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(decId); }
public CompanyInfo CompanyView(decimal companyId) { CompanyInfo infoCompany = new CompanyInfo(); CompanySP spCompany = new CompanySP(); try { infoCompany = spCompany.CompanyView(companyId); } catch (Exception ex) { MessageBox.Show("CB:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(infoCompany); }
/// <summary> /// To Display the company name in text box /// </summary> public void txtcompanynamefill() { try { CompanySP spcompany = new CompanySP(); CompanyInfo infoCompany = new CompanyInfo(); infoCompany = spcompany.CompanyView(1); string strCompanyName = infoCompany.CompanyName; txtShowCompanyName.Text = strCompanyName; txtShowCompanyName.ReadOnly = true; } catch (Exception ex) { MessageBox.Show("BS3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public DataTable CompanyViewForDotMatrix() { DataTable dtbl = new DataTable(); CompanySP spCompany = new CompanySP(); List <DataTable> listObj = new List <DataTable>(); try { listObj = spCompany.CompanyViewForDotMatrix(); dtbl = listObj[0]; } catch (Exception ex) { MessageBox.Show("CB:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(dtbl); }
/// <summary> /// On print button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvPriceList.Rows.Count > 0) { frmReport frmRepor = new frmReport(); frmRepor.MdiParent = formMDI.MDIObj; DataTable dtblOption = new DataTable(); dtblOption.Columns.Add("PurchaseRate", typeof(String)); dtblOption.Columns.Add("SalesRate", typeof(String)); dtblOption.Columns.Add("LastSalesRate", typeof(String)); dtblOption.Columns.Add("StandardRate", typeof(String)); dtblOption.Columns.Add("MRP", typeof(String)); dtblOption.Columns.Add("Price", typeof(String)); DataRow dr = dtblOption.NewRow(); dr["PurchaseRate"] = cbxPurchaseRate.Checked?"True":"False"; dr["SalesRate"] = cbxSalesRate.Checked ? "True" : "False"; dr["LastSalesRate"] = cbxlastSalesRate.Checked ? "True" : "False"; dr["StandardRate"] = CbxStandardRate.Checked ? "True" : "False"; dr["MRP"] = cbxMrp.Checked ? "True" : "False"; dr["Price"] = "True"; dtblOption.Rows.Add(dr); DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); PriceListSP spPriceList = new PriceListSP(); DataTable dtblPriceList = spPricingList.PriceListReportPrint(decGroupId, strProductName, decSizeId, decModelId, decPricingLevelId); DataTable dtblCompanyReport = spCompany.CompanyViewDataTable(1); DataTable dtblPriceListGridFill = dtblPriceListReport.Copy(); ds.Tables.Add(dtblCompanyReport); ds.Tables.Add(dtblPriceList); ds.Tables.Add(dtblOption); frmRepor.MdiParent = formMDI.MDIObj; frmRepor.PriceListReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { MessageBox.Show(" RPL17:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }