internal DataSet BindAll(CashSaleReturnModel objCashSalesReturnModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SpCashSaleReturnVoucher"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objCashSalesReturnModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objCashSalesReturnModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objCashSalesReturnModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objCashSalesReturnModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objCashSalesReturnModel.VchType); ClsCon.cmd.Parameters.AddWithValue("@ByCashSale", objCashSalesReturnModel.ByCashSale); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsCashSalesReturn = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsCashSalesReturn); dsCashSalesReturn.DataSetName = "success"; } catch (Exception) { dsCashSalesReturn = new DataSet(); dsCashSalesReturn.DataSetName = "error"; return(dsCashSalesReturn); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsCashSalesReturn); }
internal DataTable SearchCashReceipt(UpdateCashReceiptModel objUpdCashRec) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPCashVoucher"; ClsCon.cmd.Parameters.AddWithValue("@DataInd", objUpdCashRec.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdCashRec.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdCashRec.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdCashRec.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objUpdCashRec.VchType); // ClsCon.cmd.Parameters.AddWithValue("@TblCash", objUpdCashRec.Dt); ClsCon.cmd.Parameters.AddWithValue("@DocNo", objUpdCashRec.DocNo); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtUpdCashReceipt = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtUpdCashReceipt); dtUpdCashReceipt.TableName = "success"; } catch (Exception) { dtUpdCashReceipt = new DataTable(); dtUpdCashReceipt.TableName = "error"; return(dtUpdCashReceipt); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtUpdCashReceipt); }
internal DataTable LoadClosingBalance(OpeningBlcTransferModel ObjOpeningBlcTransferModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPRPTtrialBalance"; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjOpeningBlcTransferModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjOpeningBlcTransferModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjOpeningBlcTransferModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCode", ObjOpeningBlcTransferModel.YrCode); ClsCon.cmd.Parameters.AddWithValue("@VoucharDateFrom", ObjOpeningBlcTransferModel.VoucharDateFrom); ClsCon.cmd.Parameters.AddWithValue("@VoucharDateto", ObjOpeningBlcTransferModel.VoucharDateto); ClsCon.cmd.Parameters.AddWithValue("@Reportorder", ObjOpeningBlcTransferModel.Reportorder); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtFinancialYear = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtFinancialYear); dtFinancialYear.TableName = "success"; } catch (Exception) { dtFinancialYear = new DataTable(); dtFinancialYear.TableName = "error"; return(dtFinancialYear); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtFinancialYear); }
internal DataTable LastVoucherNo(SalesModel ObjSalesModel) // Pending { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", ObjSalesModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjSalesModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjSalesModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjSalesModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", ObjSalesModel.VchType); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtSales = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtSales); dtSales.TableName = "success"; } catch (Exception) { dtSales = new DataTable(); dtSales.TableName = "error"; return(dtSales); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtSales); }
internal DataTable FillGridItemName(ItemOpenningStockModel ObjopenStockModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPItems"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjopenStockModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjopenStockModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@ItemID", ObjopenStockModel.ItemID); // ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjopenStockModel.BrID); //ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjopenStockModel.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtopenStock = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtopenStock); dtopenStock.TableName = "success"; } catch (Exception) { dtopenStock = new DataTable(); dtopenStock.TableName = "error"; return(dtopenStock); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtopenStock); }
internal DataTable CancelVoucher(UpdCreditNoteModel objUpdCNModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPCreditNote"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objUpdCNModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdCNModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdCNModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@DocNo", objUpdCNModel.VoucherNo); ClsCon.cmd.Parameters.AddWithValue("@VchType", objUpdCNModel.VchType); ClsCon.cmd.Parameters.AddWithValue("@CancelReason", objUpdCNModel.CancelReason); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtCancel = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtCancel); dtCancel.TableName = "success"; } catch (Exception) { dtCancel = new DataTable(); dtCancel.TableName = "error"; return(dtCancel); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtCancel); }
internal DataTable FillGistnNo(CashSaleReturnModel objCashSalesReturnModel) //fill GistnNo { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSearchByAccount"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objCashSalesReturnModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objCashSalesReturnModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objCashSalesReturnModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objCashSalesReturnModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@AccCode", objCashSalesReturnModel.AccCode); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtCashSalesReturn = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtCashSalesReturn); dtCashSalesReturn.TableName = "success"; } catch (Exception) { dtCashSalesReturn = new DataTable(); dtCashSalesReturn.TableName = "error"; return(dtCashSalesReturn); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtCashSalesReturn); }
internal DataTable LoadState(UpdateWarehouseModel ObjUpdWarehouseModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", ObjUpdWarehouseModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjUpdWarehouseModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjUpdWarehouseModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjUpdWarehouseModel.YrCD); // ClsCon.cmd.Parameters.AddWithValue("@VchType", ObjWarehouseModel.VchType); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtUpdWarehouse = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtUpdWarehouse); dtUpdWarehouse.TableName = "success"; } catch (Exception) { dtUpdWarehouse = new DataTable(); dtUpdWarehouse.TableName = "error"; return(dtUpdWarehouse); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtUpdWarehouse); }
internal DataSet GetGSTR3BData(Gstr3BModel objGstr3BModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPGSTR3B"; ClsCon.cmd.CommandTimeout = 120; ClsCon.cmd.Parameters.AddWithValue("@Ind", objGstr3BModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objGstr3BModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objGstr3BModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objGstr3BModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@GSTIN", objGstr3BModel.GSTIN); ClsCon.cmd.Parameters.AddWithValue("@TaxMonth", objGstr3BModel.TaxMonth); ClsCon.cmd.Parameters.AddWithValue("@TaxYear", objGstr3BModel.TaxYear); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; ds3bgstr = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(ds3bgstr); ds3bgstr.DataSetName = "success"; } catch (Exception) { ds3bgstr = new DataSet(); ds3bgstr.DataSetName = "error"; return(ds3bgstr); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(ds3bgstr); }
internal DataSet BindStockTransferDDL(StockTransferModel objSTModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPStockTransfer"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objSTModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objSTModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objSTModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objSTModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objSTModel.VchType); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsStockTransfer = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsStockTransfer); dsStockTransfer.DataSetName = "success"; } catch (Exception) { dsStockTransfer = new DataSet(); dsStockTransfer.DataSetName = "error"; return(dsStockTransfer); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsStockTransfer); }
internal DataTable InvoiceSeries(UpdateSalesReturnModel objUpdSRModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", objUpdSRModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdSRModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdSRModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdSRModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objUpdSRModel.VchType); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtUpdSalesReturn = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtUpdSalesReturn); dtUpdSalesReturn.TableName = "success"; } catch (Exception) { dtUpdSalesReturn = new DataTable(); dtUpdSalesReturn.TableName = "error"; return(dtUpdSalesReturn); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtUpdSalesReturn); }
internal DataTable SearchJV(UpdateJournalVoucherModel objUJVModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPUpdateJournalVoucher"; ClsCon.cmd.Parameters.AddWithValue("@DataInd", objUJVModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUJVModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUJVModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUJVModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objUJVModel.VchType); ClsCon.cmd.Parameters.AddWithValue("@DocNo", objUJVModel.DocNo); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtUJV = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtUJV); dtUJV.TableName = "success"; } catch (Exception) { dtUJV = new DataTable(); dtUJV.TableName = "error"; return(dtUJV); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtUJV); }
internal DataTable MatchSelectedInd(SundriesModel ObjSundriModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSundries"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjSundriModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjSundriModel.OrgID); //ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjSundriModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@AccCode", ObjSundriModel.SundriCode); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtmatche = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtmatche); dtmatche.TableName = "success"; } catch (Exception) { dtmatche = new DataTable(); dtmatche.TableName = "error"; return(dtmatche); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtmatche); }
internal DataTable Gstr1Saved(Gstr1EntryModel objGstr1Model) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPGstr1Entry"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objGstr1Model.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objGstr1Model.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objGstr1Model.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objGstr1Model.YrCD); ClsCon.cmd.Parameters.AddWithValue("@User", objGstr1Model.User); ClsCon.cmd.Parameters.AddWithValue("@IP", objGstr1Model.IP); ClsCon.cmd.Parameters.AddWithValue("@TblGstr1", objGstr1Model.Dtgstr1); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtbGstr1 = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtbGstr1); dtbGstr1.TableName = "success"; } catch (Exception) { dtbGstr1 = new DataTable(); dtbGstr1.TableName = "error"; return(dtbGstr1); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtbGstr1); }
internal DataSet LoadAdvanceRefundInfo(AdvanceRefundModel objARModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPAdvanceRefund"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objARModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objARModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objARModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objARModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@DocNo", objARModel.DocNo); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsAR = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsAR); dsAR.DataSetName = "Success"; } catch (Exception) { dtAR = new DataTable(); dtAR.TableName = "error"; dsAR.Tables.Add(dtAR); return(dsAR); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsAR); }
internal DataTable PurchaseFrom(PurchaseModel ObjPurchaseModel) // FillDropDownSalesTo { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", ObjPurchaseModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjPurchaseModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjPurchaseModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjPurchaseModel.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtPurchase = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtPurchase); dtPurchase.TableName = "success"; } catch (Exception) { dtPurchase = new DataTable(); dtPurchase.TableName = "error"; return(dtPurchase); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtPurchase); }
internal DataSet BindAll(PurchaseModel ObjPurchaseModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPPurchaseVoucherChange"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjPurchaseModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjPurchaseModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjPurchaseModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjPurchaseModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", ObjPurchaseModel.VchType); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsPurchase = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsPurchase); dsPurchase.DataSetName = "success"; } catch (Exception) { dsPurchase = new DataSet(); dsPurchase.DataSetName = "error"; return(dsPurchase); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsPurchase); }
internal DataSet DisplayPVItemRecord(RCMLiabilityModel objRCMLiaModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPRCMLiability"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objRCMLiaModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objRCMLiaModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@MonthID", objRCMLiaModel.MonthID); ClsCon.cmd.Parameters.AddWithValue("@YearID", objRCMLiaModel.YearID); //ClsCon.cmd.Parameters.AddWithValue("@YearCode", objRCMLiaModel.YearCode); ClsCon.cmd.Parameters.AddWithValue("@GSTIN", objRCMLiaModel.GSTIN); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsRCMLiability = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsRCMLiability); dsRCMLiability.DataSetName = "success"; } catch (Exception) { dsRCMLiability = new DataSet(); dsRCMLiability.DataSetName = "error"; return(dsRCMLiability); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsRCMLiability); }
internal DataTable SaveAdvance(AdvanceLiabilityModel ObjALModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SpAdvanceLiability"; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjALModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjALModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjALModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YRCD", ObjALModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@YearID", ObjALModel.YearID); ClsCon.cmd.Parameters.AddWithValue("@MonthID", ObjALModel.MonthID); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtAdvanceLia = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtAdvanceLia); dtAdvanceLia.TableName = "success"; } catch (Exception) { dtAdvanceLia = new DataTable(); dtAdvanceLia.TableName = "error"; return(dtAdvanceLia); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtAdvanceLia); }
internal DataTable Filllocation(UpdateCompositionPurchaseVoucherModel objUpdPVModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", objUpdPVModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdPVModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdPVModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdPVModel.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtUpdPV = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtUpdPV); dtUpdPV.TableName = "success"; } catch (Exception) { dtUpdPV = new DataTable(); dtUpdPV.TableName = "error"; return(dtUpdPV); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtUpdPV); }
internal DataSet CheckGSTIN_Number(PurchaseModel ObjPurchaseModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSearchByAccount"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjPurchaseModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjPurchaseModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjPurchaseModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@AccCode", ObjPurchaseModel.AccCode); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsStatePanNoList = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsStatePanNoList); dsStatePanNoList.DataSetName = "success"; } catch (Exception) { dsStatePanNoList = new DataSet(); dsStatePanNoList.DataSetName = "error"; return(dsStatePanNoList); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsStatePanNoList); }
internal DataSet BindItemAndUnitDDL(UpdateStockTransferModel objUpdSTModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPUpdateStockTransfer"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objUpdSTModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdSTModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdSTModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@TransferFromWarehouseID", objUpdSTModel.WarehouseID); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsUpdStockTransfer = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsUpdStockTransfer, "SuccessDataSet"); dsUpdStockTransfer.DataSetName = "success"; } catch (Exception) { dsUpdStockTransfer = new DataSet(); dsUpdStockTransfer.DataSetName = "error"; return(dsUpdStockTransfer); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsUpdStockTransfer); }
internal DataTable UpdateShippingInfo(UpdateAccounHeadModel objUAHModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPUpdateAccountHead"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objUAHModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUAHModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUAHModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@UserID", objUAHModel.User); ClsCon.cmd.Parameters.AddWithValue("@IPAddress", objUAHModel.IP); ClsCon.cmd.Parameters.AddWithValue("@TblAccPOS", objUAHModel.DtAccPOS); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtUpdAccountHead = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtUpdAccountHead); dtUpdAccountHead.TableName = "success"; } catch (Exception) { dtUpdAccountHead = new DataTable(); dtUpdAccountHead.TableName = "error"; return(dtUpdAccountHead); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtUpdAccountHead); }
internal DataTable FillHeadName(SalesReturnModel objSalesRModel) //HeadName in Othertable { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", objSalesRModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objSalesRModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objSalesRModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objSalesRModel.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtSalesReturn = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtSalesReturn); dtSalesReturn.TableName = "success"; } catch (Exception) { dtSalesReturn = new DataTable(); dtSalesReturn.TableName = "error"; return(dtSalesReturn); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtSalesReturn); }
internal DataTable SaveBankReceipt(InterBranchModel objInterBranch) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPBankVoucher"; ClsCon.cmd.Parameters.AddWithValue("@DataInd", objInterBranch.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objInterBranch.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objInterBranch.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objInterBranch.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objInterBranch.VchType); ClsCon.cmd.Parameters.AddWithValue("@TblBank", objInterBranch.Dt); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtBankReceipt = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtBankReceipt); dtBankReceipt.TableName = "success"; } catch (Exception) { dtBankReceipt = new DataTable(); dtBankReceipt.TableName = "error"; return(dtBankReceipt); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtBankReceipt); }
internal DataTable CheckGSTIN_Number(MasterModel ObjMM) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSearchByAccount"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjMM.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjMM.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjMM.BrID); //ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjMM.accco); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtStatePanNoList = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtStatePanNoList); dtStatePanNoList.TableName = "success"; } catch (Exception) { dtStatePanNoList = new DataTable(); dtStatePanNoList.TableName = "error"; return(dtStatePanNoList); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtStatePanNoList); }
internal DataSet LoadChkListAvailable(SundriesModel ObjSundriModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSundries"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjSundriModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjSundriModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjSundriModel.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtCheckList = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtCheckList); //dtCheckList.TableName = "success"; } catch (Exception) { dtCheckList = new DataSet(); // dtCheckList.TableName = "error"; return(dtCheckList); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtCheckList); }
internal DataTable LoadPartyAccount(UpdDebitNoteModel objUpdDNModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", objUpdDNModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdDNModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdDNModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdDNModel.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtDebitNote = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtDebitNote); dtDebitNote.TableName = "success"; } catch (Exception) { dtDebitNote = new DataTable(); dtDebitNote.TableName = "error"; return(dtDebitNote); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtDebitNote); }
internal DataTable CheckBudgetAmount(BudgetAmountTranscationModel ObjBudgetAmountTranscationModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPBudgetAmount_New"; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjBudgetAmountTranscationModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjBudgetAmountTranscationModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjBudgetAmountTranscationModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjBudgetAmountTranscationModel.YrCode); ClsCon.cmd.Parameters.AddWithValue("@SectionCD", ObjBudgetAmountTranscationModel.SectionCD); ClsCon.cmd.Parameters.AddWithValue("@SubSectionCD", ObjBudgetAmountTranscationModel.SubSectionCD); ClsCon.cmd.Parameters.AddWithValue("@BudgetHeadCD", ObjBudgetAmountTranscationModel.BudgetHeadCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtBudgetAmount = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtBudgetAmount); dtBudgetAmount.TableName = "success"; } catch (Exception) { dtBudgetAmount = new DataTable(); dtBudgetAmount.TableName = "error"; return(dtBudgetAmount); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtBudgetAmount); }
internal DataSet BindAll(OldBalanceModel objOldBalance) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SpOldBalanceEntry"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objOldBalance.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objOldBalance.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objOldBalance.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objOldBalance.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsOldBalance = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsOldBalance); dsOldBalance.DataSetName = "success"; } catch (Exception) { dsOldBalance = new DataSet(); dsOldBalance.DataSetName = "error"; return(dsOldBalance); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsOldBalance); }