private void FRM_RPTROOTWISEPENDING_Load(object sender, EventArgs e) { function.settheme(this); DataSet ds = bl_obj.blFill("SP_RootTransaction"); function.fillcombo(cmbRootName, ds.Tables[1]); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; // Do not resize the form. }
private void FRM_RPTSALES_Load(object sender, EventArgs e) { //function.settheme(this); DataSet ds = bl_obj.blFill("SP_CustomerMaster"); function.fillcombo(cmbCustomerName, ds.Tables[0]); DataSet ds1 = bl_obj.blFill("SP_ItemMaster"); function.fillcombo(cmbProductName, ds1.Tables[0]); lblCustomerName.Visible = false; cmbCustomerName.Visible = false; lblProductName.Visible = false; cmbProductName.Visible = false; optDatewise.Checked = true; dtpFromDate.Value = Convert.ToDateTime("01/04/2017"); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; // Do not resize the form. }
private void Report_Viewer_Load(object sender, EventArgs e) { function.settheme(this); if (module_Rpt.rpt_name.CompareTo("FRM_ITEMMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_ItemMaster"); doc = new RptItemMaster(); doc.Database.Tables["Tbl_ItemMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } else { } }
private void btnSubmit_Click(object sender, EventArgs e) { if (optadd.Checked) { if (Validate()) { bl_obj.Parameter.Clear(); bl_obj.Parameter.Add("@ID", "0"); bl_obj.Parameter.Add("@Box_ID", kryptonComboBox2.SelectedValue.ToString()); bl_obj.Parameter.Add("@Bottle_ID", kryptonComboBox1.SelectedValue.ToString()); bl_obj.Parameter.Add("@Per_Box_Qty", txtQty.Text.Trim()); bl_obj.Parameter.Add("@Flag", "A"); ds = bl_obj.blFill_Para_Name(bl_obj.Parameter, "sp_Tbl_BottleQty_Per_Box_Type"); KryptonMessageBox.Show("Record Inserted Successfully"); } } else if (optedit.Checked) { if (Validate()) { bl_obj.Parameter.Clear(); bl_obj.Parameter.Add("@ID", txtId.Text.Trim()); bl_obj.Parameter.Add("@Box_ID", kryptonComboBox2.SelectedValue.ToString()); bl_obj.Parameter.Add("@Bottle_ID", kryptonComboBox1.SelectedValue.ToString()); bl_obj.Parameter.Add("@Per_Box_Qty", txtQty.Text.Trim()); bl_obj.Parameter.Add("@Flag", "U"); bl_obj.Parameter.Add("@ID", txtId.Text.Trim()); ds = bl_obj.blFill_Para_Name(bl_obj.Parameter, "sp_Tbl_BottleQty_Per_Box_Type"); KryptonMessageBox.Show("Record Updated Successfully"); } } else if (optdelete.Checked) { List <string> Para = new List <string>(); Para.Clear(); Para.Add("@Flag"); Para.Add("@ID"); ds = bl_obj.DeleteRec(lvw, Para, 0, "sp_Tbl_BottleQty_Per_Box_Type"); KryptonMessageBox.Show("Record Deleted Successfully"); } FillLVW(bl_obj.blFill("sp_Tbl_BottleQty_Per_Box_Type"), 0); optadd.Checked = true; kryptonComboBox1.SelectedIndex = 0; kryptonComboBox2.SelectedIndex = 0; txtQty.Clear(); }
private void rb_Boxing_CheckedChanged(object sender, EventArgs e) { if (rb_Boxing.Checked == true) { bl_obj.Parameter.Clear(); bl_obj.Parameter.Add("@Flag", "L"); bl_obj.Parameter.Add("@ID", "0"); bl_obj.Parameter.Add("@Code", "BOXING"); ds = bl_obj.blFill_Para_Name(bl_obj.Parameter, "sp_GetData"); function.fillcombo(cmbBoxBottle, ds.Tables[0]); function.fillcombo(cmbBox, ds.Tables[1]); DataSet ds1 = bl_obj.blFill("sp_GetItem"); function.fillcombo(kryptonComboBox1, ds1.Tables[0]); groupBox2.Visible = false; groupBox3.Visible = false; groupBox4.Visible = true; groupBox6.Visible = false; groupBox7.Visible = false; clear("Boxing"); } }
private void Report_Viewer_Load(object sender, EventArgs e) { function.settheme(this); //--------*********>>>>>>>>>>>>>>>>> Binding a Report Master Form <<<<<<<<<<<<<<<*********-------- if (module_Rpt.rpt_name.CompareTo("FRM_EMPLOYEEMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_EmployeeMaster"); doc = new RptEmployeeMaster(); doc.Database.Tables["Tbl_EmployeeMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_ITEMMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_ItemMaster"); doc = new RptItemMaster(); doc.Database.Tables["Tbl_ItemMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_CUSTOMERMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_CustomerMaster"); doc = new RptCustomerMaster(); doc.Database.Tables["Tbl_CustomerMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_TRANSPORTATION_MASTER") == 0) { DataSet ds = bl_obj.blFill("SP_TransportationMaster"); doc = new RptTransportationMaster(); doc.Database.Tables["Tbl_TransportationMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_EXPENCESMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_ExpencesMaster"); doc = new RptExpencesMaster(); doc.Database.Tables["Tbl_ExpencesMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_ROWMATERIAL") == 0) { DataSet ds = bl_obj.blFill("SP_RowHedar"); doc = new RptRowMaterial(); doc.Database.Tables["Tbl_RowHedar"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_SUPPLIERMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_SupplierMaster"); doc = new RptSupplierMaster(); doc.Database.Tables["Tbl_SupplierMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_TRANSPORTATION_MASTER") == 0) { DataSet ds = bl_obj.blFill("SP_TransportationMaster"); doc = new RptTransportationMaster(); doc.Database.Tables["Tbl_TransportationMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_SUBEXPENCESMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_SubExpencesMaster"); doc = new RptSubExpencesMaster(); doc.Database.Tables["Tbl_SubExpencesMaster"].SetDataSource(ds.Tables[0]); //doc.Database.Tables["Tbl_ExpencesMaster"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("FRM_MEASUREMENTMASTER") == 0) { DataSet ds = bl_obj.blFill("SP_MeasurementMaster"); doc = new RptMeasurmentMaster(); doc.Database.Tables["Tbl_Measurment"].SetDataSource(ds.Tables[0]); crystalReportViewer1.ReportSource = doc; } //--------*********>>>>>>>>>>>>>>>>> Binding a Report Transaction <<<<<<<<<<<<<<<*********-------- if (module_Rpt.rpt_name.CompareTo("RptSalesInvoice") == 0) { doc = new RptSalesInvoice(); doc.Database.Tables["Tbl_Sales_Invoice"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptPendingInvoice") == 0) { doc = new RptPendingInvoice(); doc.Database.Tables["Tbl_PendingInvoice"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptPendingInvoiceCustomerwise") == 0) { doc = new RptPendingInvoiceCustomerwise(); doc.Database.Tables["Tbl_PendingInvoiceCustomerwise"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptScrapwise") == 0) { doc = new RptScrapwise(); doc.Database.Tables["Tbl_Scrapwise"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("rptDayBook") == 0) { doc = new rptDayBookNew(); doc.Database.Tables["DayBookNew"].SetDataSource(dataSet1.Tables[0]); //doc.Database.Tables["Tbl_OpeningBalance"].SetDataSource(dataSet1.Tables[1]); //doc.ParameterFields.Add("OpeningBal"); //doc.SetParameterValue("OpeningBal",dataSet1.Tables[1].Rows[0][0].ToString()); //doc.SetParameterValue("Date", dataSet1.Tables[1].Rows[0][1].ToString()); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("rptCashBook") == 0) { DataSet ds = new DataSet(); paraname.Clear(); paravalue.Clear(); paraname.Add("@From_Date"); paraname.Add("@flag"); paravalue.Add(_fromdate.ToString("yyyy-MM-dd")); paravalue.Add("OP"); ds = bl_obj.blFill_para_name(paraname, paravalue, "SP_Report"); doc = new rptCashBook(); doc.Database.Tables["CashBookNew"].SetDataSource(dataSet1.Tables[0]); //doc.Database.Tables["Tbl_OpeningBalance"].SetDataSource(dataSet1.Tables[1]); //doc.ParameterFields.Add("OpeningBal"); doc.SetParameterValue("OpeningBal", ds.Tables[0].Rows[0][0].ToString()); doc.SetParameterValue("Date", _fromdate); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptSales") == 0) { doc = new RptSales(); doc.Database.Tables["Tbl_Sales"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptPurchase") == 0) { doc = new RptPurchase(); doc.Database.Tables["Tbl_Purchase"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptGeneralLedger") == 0) { doc = new RptGeneralLedger(); doc.Database.Tables["Tbl_GeneralLedger"].SetDataSource(dataSet1.Tables[0]); doc.SetParameterValue("OpeningBal", dataSet1.Tables[1].Rows[0][0].ToString()); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptTrialBalance") == 0) { doc = new RptTrialBalance(); doc.Database.Tables["Tbl_TrialBalance"].SetDataSource(dataSet1.Tables[0]); //doc.Database.Tables["Tbl_OpeningBalance"].SetDataSource(dataSet1.Tables[1]); //doc.ParameterFields.Add("OpeningBal"); doc.SetParameterValue("OpeningBal", dataSet1.Tables[1].Rows[0][0].ToString()); doc.SetParameterValue("Date", dataSet1.Tables[1].Rows[0][1].ToString()); doc.SetParameterValue("ToDate", dataSet1.Tables[1].Rows[0][2].ToString()); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptRoot") == 0) { doc = new RptRoot(); doc.Database.Tables["Tbl_Root"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("rptFinishedGoods") == 0) { doc = new rptFinishedGoods(); doc.Database.Tables["Tbl_FinishedGoods"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("rptRowMaterialStock") == 0) { doc = new rptRowMaterialStock(); doc.Database.Tables["Tbl_RowMaterialStock"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("rptProductionReport") == 0) { doc = new rptProductionReport(); doc.Database.Tables["Tbl_ProductionReport"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } //if (module_Rpt.rpt_name.CompareTo("RptTax") == 0) //{ // doc = new RptTax(); // doc.Database.Tables["Tbl_Tax"].SetDataSource(dataSet1.Tables[0]); // crystalReportViewer1.ReportSource = doc; //} if (module_Rpt.rpt_name.CompareTo("rptCustomerLedgerNew") == 0) { doc = new rptCustomerLedgerNew(); doc.Database.Tables["Tbl_Customer_Ledger_New"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("rptDateWiseAllCustTotal") == 0) { doc = new rptDateWiseAllCustTotal(); doc.Database.Tables["AllCustDateWiseTotal"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } //if (module_Rpt.rpt_name.CompareTo("RptDateWiseAllCustomer") == 0) //{ // doc = new RptDateWiseAllCustomer(); // doc.Database.Tables["AllCustDateWiseTotal"].SetDataSource(dataSet1.Tables[0]); // crystalReportViewer1.ReportSource = doc; //} if (module_Rpt.rpt_name.CompareTo("rptDebitCreditTransaction") == 0) { doc = new rptDebitCreditTransaction(); doc.Database.Tables["Tbl_DebitCreditTransaction"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RptGSTTax") == 0) { doc = new RptGSTTax(); doc.Database.Tables["Tbl_Tax"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } if (module_Rpt.rpt_name.CompareTo("RPTGSTR") == 0) { doc = new RPTGSTR(); doc.Database.Tables["Tbl_GSTR"].SetDataSource(dataSet1.Tables[0]); crystalReportViewer1.ReportSource = doc; } else { } }
private void FRM_Vehical_Details_Load(object sender, EventArgs e) { ds = bl_obj.blFill("SP_TransportationMaster"); function.fillcombo(cmbTransport, ds); }