private void BusinessProdfitLossReportControl_Load(object sender, EventArgs e) { reportEngine = new AnalysisReports(); string[] levels = Enum.GetNames(typeof(ReportLevel)); foreach (string level in levels) { cbSelect.Items.Add(level); } if (cbSelect.Items != null && cbSelect.Items.Count > 0) cbSelect.SelectedIndex = 0; }
private void CurrentCashReport_Load(object sender, EventArgs e) { //CompaniesBalance,CustomerBalance , TotalPurchase , TotalSale DataTable dt = null; reportEngine = new AnalysisReports(); dt = reportEngine.CurrentCashReport(); if (dt != null) { txtCompaniesBalance.Text = Convert.ToDecimal(dt.Rows[0]["CompaniesBalance"]).ToString("#0.00"); txtCustomersBalance.Text = Convert.ToDecimal(dt.Rows[0]["CustomerBalance"]).ToString("#0.00"); txtTotalPurchase.Text = Convert.ToDecimal(dt.Rows[0]["TotalPurchase"]).ToString("#0.00"); txtTotalSale.Text = Convert.ToDecimal(dt.Rows[0]["TotalSale"]).ToString("#0.00"); txtCashInHand.Text = Convert.ToDecimal(dt.Rows[0]["CashInHand"]).ToString("#0.00"); } }
private void GetData() { DataTable dt = null; dgvData.DataSource = dt; DateTime? startDate = dtpStartDate.Value; DateTime? endDate = dtpEndDate.Value; if (chkAllDates.Checked) { startDate = null; endDate = null; } string strId = string.IsNullOrEmpty(cbSelect.ValueMember) ? string.Empty : Convert.ToString(((DataRowView)(cbSelect.SelectedItem)).Row[cbSelect.ValueMember]); long Id = 0; if (long.TryParse(strId, out Id) && Id >= 0) { if (reportEngine == null) reportEngine = new AnalysisReports(); if (cbReport.SelectedIndex == 0) { dt = reportEngine.ProductTransactionDetailedReprot(Common.FormateDateForDB(startDate), Common.FormateDateForDB(endDate), strId); } else { dt = reportEngine.ProductTransactionSummaryReprot(Common.FormateDateForDB(startDate), Common.FormateDateForDB(endDate), strId); } } if (dt != null) { dgvData.DataSource = dt; } }
private void Initialize() { InitializeComponent(); Common.BindItemCombo(ref cbSelect, false); lblSelect.Text = "Select Item:"; lblReportHeader.Text = "Product Transaction Report"; reportEngine = new AnalysisReports(); cbReport.SelectedIndex = 0; }
void SetReports() { reportEngine = new AnalysisReports(); LoadReportsCombo(); }
private void DailySalesPurchaseReport_Load(object sender, EventArgs e) { reportEngine = new AnalysisReports(); splitContainer.SplitterDistance = panel3.Width / 2; cbSelect.SelectedIndex = 0; Common.BindItemCombo(ref cboProduct, true); }