public void LoadDetails(string commid, string itemno, int empid, bool useconstr = false, string newconstr = "p") { var ds = new BLReports().GetSalesTargetDetails(commid, itemno,empid,useconstr , newconstr); gridControl1.DataSource = ds; }
private void simpleButton1_Click(object sender, EventArgs e) { if (dateEdit1.EditValue == null || dateEdit2.EditValue == null) { XtraMessageBox.Show("Please check the dates", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } string othercon = string.Empty; othercon = connew[0] + ";" + "Initial Catalog =" + lookUpEdit3.EditValue + ";" + connew[2] + ";" + connew[3] + ";" + connew[4] + ";"; string stype = "A"; // WHEN 'C' THEN 'Credit' //WHEN 'I' THEN 'Insurance' //WHEN 'A' THEN 'Cash' if (comboBox1.SelectedIndex == 1) stype = "C"; if (comboBox1.SelectedIndex == 2) stype = "I"; var ds = new BLReports().SalesTargetFrmDtToDate(dateEdit2.DateTime, dateEdit1.DateTime, int.Parse(lookUpEdit2.EditValue.ToString()), lookUpEdit2.GetColumnValue("EMPNO").ToString(), lookUpEdit2.Text + '-' +lookUpEdit2.GetColumnValue("EMPNO"), stype, othercon); //var ds = new Reports.BLReports().GetSalestargetbyDate(lookUpEdit2.GetColumnValue("EMPNO").ToString(), int.Parse(lookUpEdit2.EditValue.ToString()), // dateEdit2.DateTime, // dateEdit1.DateTime, lookUpEdit2.Text, othercon); gridControl1.DataSource = ds; }
private void simpleButton1_Click(object sender, EventArgs e) { if(dateEdit1.EditValue==null) { XtraMessageBox.Show("Please enter the date ", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if(textEdit1.EditValue==null) { XtraMessageBox.Show("Please enter the initial amount ", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); textEdit1.Focus(); return; } int ret = 0; //1 - OPENING CASH 2 - SALE VALUE 3 - COST VALUE 4 - TRANSFER AMOUNT 5 - END CASH var bl = new BlDailySales(); var sprice = new BLReports().GetSumSprice(); var cprice = new BLReports().GetSumCprice(); var dtc = dateEdit1.DateTime; if(bl.DoSave(1,"Opening Cash",decimal.Parse(textEdit1.EditValue.ToString()),dtc,true)!=0) { ret = 1; if (bl.DoSave(2, "Opening Sprice", sprice, dtc, true) != 0) bl.DoSave(3, "Opening Cprice", cprice, dtc, true); } if (ret == 1) Close(); else XtraMessageBox.Show("Data not saved contact to system administrator", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void LoadDailyReport() { var bl = new BLReports(); var ds = bl.GetDailySales(ClosingDifference, DateTime.Now, DateTime.Now, false); dailySalesBindingSource.DataSource = ds; var dscredit = bl.GetCreditDetails(DateTime.Now, DateTime.Now, false); gridControl2.DataSource = dscredit; }
private void simpleButton2_Click(object sender, EventArgs e) { if(dateEdit1.EditValue==null || dateEdit2.EditValue==null) { XtraMessageBox.Show("Please check the dates", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } var bl = new BLReports().SalesReturnListData(dateEdit1.DateTime, dateEdit2.DateTime); gridControl1.DataSource = bl; }
void GetData(string itemno,string itemname,string sel) { if(sel==bool.TrueString) { var bl = new BLReports().GetItemMove(itemname, itemno, dateEdit1.DateTime, dateEdit2.DateTime); dsReports.Merge(bl); gridControl2.DataSource = dsReports.GetItemMove; } //else //{ //// RemoveFromGrid(itemname); //} }
private void simpleButton1_Click(object sender, EventArgs e) { string othercon = string.Empty; bool useo = false; if (lookUpEdit3.EditValue != null) { othercon = connew[0] + ";" + "Initial Catalog =" + lookUpEdit3.EditValue + ";" + connew[2] + ";" + connew[3] + ";" + connew[4] + ";"; useo = true; } if (lookUpEdit1.EditValue != null) { var ds = new BLReports().GetSalesTargetDetFSelStore(lookUpEdit1.EditValue.ToString(), int.Parse(lookUpEdit2.EditValue.ToString()),useo,othercon); gridControl1.DataSource = ds; } }
private void simpleButton2_Click(object sender, EventArgs e) { if (dateEdit1.EditValue == null || dateEdit2.EditValue == null) { XtraMessageBox.Show("Please check the dates", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } string newconstr = string.Empty; bool useconstr = false; if (lookUpEdit3.EditValue != null) { newconstr = connew[0] + ";" + "Initial Catalog =" + lookUpEdit3.EditValue + ";" + connew[2] + ";" + connew[3] + ";" + connew[4] + ";"; useconstr = true; } if(_rtype==1) { var bl = new BLReports().GetCashSalesDataTable(dateEdit1.DateTime.Date, dateEdit2.DateTime.Date, useconstr, newconstr); colCUSTNAME.Visible = false; gridControl1.DataSource = bl; } if (_rtype == 2) { var bl = new BLReports().GetCreditSalesDataTable(dateEdit1.DateTime.Date, dateEdit2.DateTime.Date); colCUSTNAME.Visible = true; gridControl1.DataSource = bl; } if (_rtype == 3) { var bl = new BLReports().GetInsuranceSalesDataTable(dateEdit1.DateTime.Date, dateEdit2.DateTime.Date); colCUSTNAME.Visible = true; gridControl1.DataSource = bl; } }
public void DoSlipPrint(string sinvno) { var ds = new BLReports().GetRptSalesInv(sinvno); var sp = new SlipPrinting(); sp._InvoiceNo = sinvno; sp.ds = ds; sp.print(); }
public void DoPrint(string sinvno,string customern = "") { //DoSlipPrint(sinvno); //var rpt = new Reports.RptSalesInvoice(); //var ds = new Reports.BLReports().GetRptSalesInv(sinvno); //rpt.Company = VIRETAILDAL.COMMON.Utils.Companyname; //rpt.DataSource = ds; //var printTool = new ReportPrintTool(rpt); //printTool.ShowPreview(); var ds = new BLReports().GetRptSalesInv(sinvno); var rpt = new RptSalesInvoice(); rpt.Customername = customern; rpt.DataSource = ds; rpt.Company = Utils.Companyname; if (!string.IsNullOrEmpty(ds[0]["SDISC"].ToString())) { rpt.patshare = decimal.Parse(ds[0]["SDISC"].ToString()).ToString("n2"); } rpt.NetAmount = decimal.Parse(ds[0]["NETAMT"].ToString()).ToString("n2"); //netamoount.ToString("n2"); rpt.Print(); }
private void DailyClosing_Load(object sender, EventArgs e) { var tfrom = new TimeSpan(3, 10, 0); // dateEdit1.DateTime = System.DateTime.Now.AddDays(-1); dateEdit1.DateTime = DateTime.Now; var ds = new BLReports().GetDailySales(0m,DateTime.Now,DateTime.Now,false); var srows = ds.Select("ctype=1"); foreach (DataRow d in srows) { txtcash.EditValue = decimal.Parse(d["TOTAL"].ToString()); } var d1 = new BlDailySales().GetLastClosing(DateTime.Now, false); foreach (DataRow dr in d1.Rows) { if (dr["CTYPE"].ToString() == "1") { txttotalcash.EditValue = decimal.Parse(dr["CVALUE"].ToString()) + decimal.Parse(txtcash.EditValue.ToString()); txtclosing.EditValue = txttotalcash.EditValue; txtlastclosing.EditValue = decimal.Parse(dr["CVALUE"].ToString()); dateEdit2.EditValue = dr["CDATE"].ToString(); } } //txtcashtrans.Properties.Mask.EditMask = "\\c+"; //txtcashtrans.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx; //if(System.DateTime.Now) }
public void DoSlipPrint(string sinvno,string customer, decimal subtotal = 0, decimal discount = 0, decimal retamt = 0, decimal netamoount = 0,bool screenprint=false) { var ds = new BLReports().GetRptSalesInv(sinvno,false); var rpt = new RptSalesInvoice(); rpt.DataSource = ds; rpt.Company = Utils.Companyname; rpt.patshare = discount.ToString("n2"); rpt.NetAmount = netamoount.ToString("n2"); rpt.ScreenPrint = screenprint; rpt.Customername = customer; rpt.Print(); //var sp = new SlipPrinting(); //sp._InvoiceNo = sinvno; //sp._tot = subtotal.ToString(); //sp._disc = discount.ToString(); //sp._ReturnAmt = retamt.ToString(); //sp._NetAmount = netamoount.ToString(); //sp.ds = ds; //sp.print(); }
void DoCloseSale() { if (!validateform()) { var bl = new BlDailySales(); var sprice = new BLReports().GetSumSprice(); var cprice = new BLReports().GetSumCprice(); int ret = 0; var f = new RptDailySalesReport {ClosingDifference = decimal.Parse(txtcashdiff.EditValue.ToString())}; f.LoadDailyReport(); f.watermark = "Closed"; //if ((DateTime.Now.TimeOfDay > new TimeSpan(0, 1, 0)) && (DateTime.Now.TimeOfDay <= new TimeSpan(2, 50, 0))) //{ // f.aMonth = dateEdit1.DateTime.AddDays(-1).ToShortTimeString(); //} //else //{ f.aMonth = dateEdit1.DateTime.ToShortDateString(); // } // f.Show(); f.CreateReport(); f.Hide(); simpleButton1.Enabled = false; var dtc = dateEdit1.DateTime; if (bl.DoSave(1, "Opening Cash", decimal.Parse(txtclosing.EditValue.ToString()), dtc) != 0) { var blP = new BLSales(); blP.UpdateShitCode(1.ToString()); if (bl.DoSave(2, "Opening Sprice", sprice, dtc) != 0) if (bl.DoSave(3, "Opening Cprice", cprice, dtc) != 0) if (decimal.Parse(txtcashtrans.EditValue.ToString()) > 0) bl.DoSave(4, "Transfer Amt", decimal.Parse(txtcashtrans.EditValue.ToString()), dtc); if (decimal.Parse(txtcashdiff.EditValue.ToString()) > 0) bl.DoSave(5, "Difference Amt", decimal.Parse(txtcashdiff.EditValue.ToString()), dtc); bl.DoSave(6, "Last Opening", decimal.Parse(txtlastclosing.EditValue.ToString()), dtc); new VIRETAILDAL.Masters.DailyClosing().CloseDailySales(dtc); } } else { simpleButton1.Enabled = true; } }
public void LoadDailyReport(DateTime d1,DateTime d2,bool t=true,bool useconstr=false,string newconstr="p") { var bl = new BLReports(); var ds = bl.GetDailySales(ClosingDifference, d1.Date, d2.Date, t,useconstr,newconstr); dailySalesBindingSource.DataSource = ds; var dscredit = bl.GetCreditDetails(d1.Date, d2.Date, t, useconstr, newconstr); gridControl2.DataSource = dscredit; }
void LoadData() { string othercon = string.Empty; bool useo = false; if (lookUpEdit3.EditValue != null) { othercon = connew[0] + ";" + "Initial Catalog =" + lookUpEdit3.EditValue + ";" + connew[2] + ";" + connew[3] + ";" + connew[4] + ";"; useo = true; } // if (_usesecondgrid) { var bl = new BLReports().InsuranceSalesByItemWise(dateEdit1.DateTime.Date, dateEdit2.DateTime.Date, useo, othercon); insuranceSalesByItemWiseBindingSource.DataSource = bl; } else { var bl = new BLReports().InsuranceSalesDetails(dateEdit1.DateTime.Date, dateEdit2.DateTime.Date, useo, othercon); gridControl1.DataSource = bl; } }
private void bandedGridView1_DoubleClick(object sender, EventArgs e) { if (!bandedGridView1.IsGroupRow(bandedGridView1.FocusedRowHandle)) { var dr = bandedGridView1.GetDataRow(bandedGridView1.FocusedRowHandle); var bl = new BLReports().GetItemMoveDetails(dr["itemname"].ToString(), dr["itemno"].ToString(),DateTime.Parse(dr["trandate"].ToString()), dateEdit2.DateTime); var f = new RptFrmItemMoveDrillDown(); f.LoadData(bl, DateTime.Parse(dr["trandate"].ToString()), dateEdit2.DateTime); f.ShowDialog(); } }
public void DoInsurancePrint(string sinvno) { var bl = new BLReports(); bl.PrintInsuranceSalesInvioce(sinvno); }