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 FillIWareHouseName(ItemOpenningStockModel ObjopenStockModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPMasters"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@DataInd", ObjopenStockModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjopenStockModel.OrgID); // 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 CheckBudgetAmount(NewBudgetAmountModel ObjNewBudgetAmountModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPBudgetAmount"; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjNewBudgetAmountModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjNewBudgetAmountModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjNewBudgetAmountModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjNewBudgetAmountModel.YrCode); ClsCon.cmd.Parameters.AddWithValue("@SectionCD", ObjNewBudgetAmountModel.SectionCD); ClsCon.cmd.Parameters.AddWithValue("@SubSectionCD", ObjNewBudgetAmountModel.SubSectionCD); ClsCon.cmd.Parameters.AddWithValue("@BudgetHeadCD", ObjNewBudgetAmountModel.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(CompositionSalesModel ObjCompositionSalesModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSaleVoucher"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjCompositionSalesModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjCompositionSalesModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjCompositionSalesModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjCompositionSalesModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", ObjCompositionSalesModel.VchType); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsSales = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsSales); dsSales.DataSetName = "success"; } catch (Exception) { dsSales = new DataSet(); dsSales.DataSetName = "error"; return(dsSales); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsSales); }
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 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 DataSet BindAll(UpdateCompositionPurchaseVoucherModel objUpdPVModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPPurchaseVoucherChange"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objUpdPVModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdPVModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdPVModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdPVModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objUpdPVModel.VchType); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dsUpdPV = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dsUpdPV); dsUpdPV.DataSetName = "success"; } catch (Exception) { dsUpdPV = new DataSet(); dsUpdPV.DataSetName = "error"; return(dsUpdPV); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dsUpdPV); }
internal DataTable LoadSalesTo(CompositionSalesModel ObjCompositionSalesModel) // 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", ObjCompositionSalesModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjCompositionSalesModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjCompositionSalesModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjCompositionSalesModel.YrCD); 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 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 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 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 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 DataTable FillItemName(PurchaseModel ObjPurchaseModel) //fill GistnNo { 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(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); }
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 FillGistnNo(UpdDebitNoteModel objUpdDNModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSearchByAccount"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objUpdDNModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdDNModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdDNModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdDNModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@AccCode", objUpdDNModel.AccCode); 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 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 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 UpdateClientInfo(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("@YrCD", objUAHModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@AccCode", objUAHModel.AccCode); ClsCon.cmd.Parameters.AddWithValue("@AccName", objUAHModel.AccName); ClsCon.cmd.Parameters.AddWithValue("@AccNameHindi", objUAHModel.AccNameHindi); ClsCon.cmd.Parameters.AddWithValue("@MainGroupID", objUAHModel.MainGroupID); ClsCon.cmd.Parameters.AddWithValue("@SubGroupID", objUAHModel.SubGroupID); ClsCon.cmd.Parameters.AddWithValue("@AccGroupID", objUAHModel.AccGroupID); ClsCon.cmd.Parameters.AddWithValue("@AccSubGroupID", objUAHModel.AccSubGroupID); ClsCon.cmd.Parameters.AddWithValue("@Address", objUAHModel.Address); ClsCon.cmd.Parameters.AddWithValue("@City", objUAHModel.City); ClsCon.cmd.Parameters.AddWithValue("@StateID", objUAHModel.StateID); ClsCon.cmd.Parameters.AddWithValue("@PinCode", objUAHModel.PinCode); ClsCon.cmd.Parameters.AddWithValue("@PanNo", objUAHModel.PanNo); ClsCon.cmd.Parameters.AddWithValue("@MobileNo", objUAHModel.MobileNo); ClsCon.cmd.Parameters.AddWithValue("@LandlineNo", objUAHModel.LandlineNo); ClsCon.cmd.Parameters.AddWithValue("@Email", objUAHModel.Email); ClsCon.cmd.Parameters.AddWithValue("@ContactPerson", objUAHModel.ContactPerson); ClsCon.cmd.Parameters.AddWithValue("@DrOpBalance", objUAHModel.DrOpBalance); ClsCon.cmd.Parameters.AddWithValue("@CrOpBalance", objUAHModel.CrOpBalance); ClsCon.cmd.Parameters.AddWithValue("@CategoryID", objUAHModel.CategoryID); ClsCon.cmd.Parameters.AddWithValue("@ISDApplicable", objUAHModel.ISDApplicable); ClsCon.cmd.Parameters.AddWithValue("@TDSApplicable", objUAHModel.TDSApplicable); ClsCon.cmd.Parameters.AddWithValue("@RCMApplicable", objUAHModel.RCMApplicable); ClsCon.cmd.Parameters.AddWithValue("@TCSApplicable", objUAHModel.TCSApplicable); ClsCon.cmd.Parameters.AddWithValue("@MerchantID", objUAHModel.MerchantID); ClsCon.cmd.Parameters.AddWithValue("@BankName", objUAHModel.BankName); ClsCon.cmd.Parameters.AddWithValue("@BranchName", objUAHModel.BranchName); ClsCon.cmd.Parameters.AddWithValue("@IFSCCode", objUAHModel.IFSCCode); ClsCon.cmd.Parameters.AddWithValue("@BankAccountNo", objUAHModel.BankAccountNo); ClsCon.cmd.Parameters.AddWithValue("@UserID", objUAHModel.User); ClsCon.cmd.Parameters.AddWithValue("@IPAddress", objUAHModel.IP); ClsCon.cmd.Parameters.AddWithValue("@CompositionOpted", objUAHModel.CompositionOpted); ClsCon.cmd.Parameters.AddWithValue("@ReffPartyCode", objUAHModel.ReffPartyCode); ClsCon.cmd.Parameters.AddWithValue("@IsSubDealer", objUAHModel.IsSubDealer); ClsCon.cmd.Parameters.AddWithValue("@DiscountRate", objUAHModel.DiscountRate); ClsCon.cmd.Parameters.AddWithValue("@BrokerageRate", objUAHModel.BrokerageRate); ClsCon.cmd.Parameters.AddWithValue("@TblAccTerms", objUAHModel.TblAccTerms); ClsCon.cmd.Parameters.AddWithValue("@TaxCalcForSEZParty", objUAHModel.TaxCalcForSEZParty); ClsCon.cmd.Parameters.AddWithValue("@BrokerageLimit", objUAHModel.BrokerageLimit); ClsCon.cmd.Parameters.AddWithValue("@BrokerageType", objUAHModel.BrokerageType); ClsCon.cmd.Parameters.AddWithValue("@Remark", objUAHModel.Remark); 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 SavePurchase(PurchaseModel ObjPurchaseModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPPurchaseVoucherChange"; 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); ClsCon.cmd.Parameters.AddWithValue("@EntryType", ObjPurchaseModel.EntryType); ClsCon.cmd.Parameters.AddWithValue("@User", ObjPurchaseModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", ObjPurchaseModel.IP); ClsCon.cmd.Parameters.AddWithValue("@ByCashSale", ObjPurchaseModel.ByCashSale); ClsCon.cmd.Parameters.AddWithValue("@PartyName", ObjPurchaseModel.PartyName); ClsCon.cmd.Parameters.AddWithValue("@PartyGSTIN", ObjPurchaseModel.PartyGSTIN); ClsCon.cmd.Parameters.AddWithValue("@PartyAddress", ObjPurchaseModel.PartyAddress); ClsCon.cmd.Parameters.AddWithValue("@WareHouseID", ObjPurchaseModel.WareHouseID); ClsCon.cmd.Parameters.AddWithValue("@PONo", ObjPurchaseModel.PONo); ClsCon.cmd.Parameters.AddWithValue("@PurchaseBillNo", ObjPurchaseModel.PurchaseBillNo); ClsCon.cmd.Parameters.AddWithValue("@PurchaseBillDate", ObjPurchaseModel.PurchaseBillDate); ClsCon.cmd.Parameters.AddWithValue("@GRNNo", ObjPurchaseModel.GRNNo); ClsCon.cmd.Parameters.AddWithValue("@DocDate", ObjPurchaseModel.VoucherDate); ClsCon.cmd.Parameters.AddWithValue("@CCCode", ObjPurchaseModel.CCCode); ClsCon.cmd.Parameters.AddWithValue("@IDARefNo", ObjPurchaseModel.IDARefNo);//ida Ref No. ClsCon.cmd.Parameters.AddWithValue("@BrokerageID", ObjPurchaseModel.BrokerageID); ClsCon.cmd.Parameters.AddWithValue("@BrokerageRate", ObjPurchaseModel.BrokerageRate); ClsCon.cmd.Parameters.AddWithValue("@BrokerageGSTIN", ObjPurchaseModel.BrokerageGSTIN); ClsCon.cmd.Parameters.AddWithValue("@BrokerageAmount", ObjPurchaseModel.BrokerageAmount); ClsCon.cmd.Parameters.AddWithValue("@TblPurchase", ObjPurchaseModel.DtPurchase); ClsCon.cmd.Parameters.AddWithValue("@TblPurchaseItems", ObjPurchaseModel.DtItems); ClsCon.cmd.Parameters.AddWithValue("@TblPurchaseSundries", ObjPurchaseModel.DtSundries); ClsCon.cmd.Parameters.AddWithValue("@TblAdvanceDetail", ObjPurchaseModel.DtAdjAdvance); ClsCon.cmd.Parameters.AddWithValue("@DeptID", ObjPurchaseModel.DeptID); ClsCon.cmd.Parameters.AddWithValue("@SubDeptID", ObjPurchaseModel.SubDeptID); ClsCon.cmd.Parameters.AddWithValue("@IsFinal", ObjPurchaseModel.IsFinal); 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 DataTable UpdateSaleVoucher(UpdateSalesModel ObjSalesModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPUpdateSaleVoucher"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", 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); ClsCon.cmd.Parameters.AddWithValue("@EntryType", ObjSalesModel.EntryType); ClsCon.cmd.Parameters.AddWithValue("@User", ObjSalesModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", ObjSalesModel.IP); ClsCon.cmd.Parameters.AddWithValue("@ByCashSale", ObjSalesModel.ByCashSale); ClsCon.cmd.Parameters.AddWithValue("@PartyName", ObjSalesModel.PartyName); ClsCon.cmd.Parameters.AddWithValue("@PartyGSTIN", ObjSalesModel.PartyGSTIN); ClsCon.cmd.Parameters.AddWithValue("@PartyAddress", ObjSalesModel.PartyAddress); ClsCon.cmd.Parameters.AddWithValue("@WareHouseID", ObjSalesModel.WareHouseID); ClsCon.cmd.Parameters.AddWithValue("@TransName", ObjSalesModel.TransName); ClsCon.cmd.Parameters.AddWithValue("@PONo", ObjSalesModel.PONo); ClsCon.cmd.Parameters.AddWithValue("@InvoiceSeries", ObjSalesModel.InvoiceSeries); ClsCon.cmd.Parameters.AddWithValue("@DocNo", ObjSalesModel.DocNo); ClsCon.cmd.Parameters.AddWithValue("@TblSale", ObjSalesModel.DtSales); ClsCon.cmd.Parameters.AddWithValue("@TblItems", ObjSalesModel.DtItems); ClsCon.cmd.Parameters.AddWithValue("@TblSundries", ObjSalesModel.DtSundries); ClsCon.cmd.Parameters.AddWithValue("@CCCode", ObjSalesModel.CCCode); ClsCon.cmd.Parameters.AddWithValue("@BrokerageID", ObjSalesModel.BrokerageID); ClsCon.cmd.Parameters.AddWithValue("@BrokerageRate", ObjSalesModel.BrokerageRate); ClsCon.cmd.Parameters.AddWithValue("@BrokerageGSTIN", ObjSalesModel.BrokerageGSTIN); ClsCon.cmd.Parameters.AddWithValue("@BrokerageAmount", ObjSalesModel.BrokerageAmount); 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 SaveCashSalesVoucher(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("@EntryType", objCashSalesReturnModel.EntryType); ClsCon.cmd.Parameters.AddWithValue("@User", objCashSalesReturnModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", objCashSalesReturnModel.IP); ClsCon.cmd.Parameters.AddWithValue("@ByCashSale", objCashSalesReturnModel.ByCashSale); ClsCon.cmd.Parameters.AddWithValue("@PartyName", objCashSalesReturnModel.PartyName); ClsCon.cmd.Parameters.AddWithValue("@PartyGSTIN", objCashSalesReturnModel.PartyGSTIN); ClsCon.cmd.Parameters.AddWithValue("@PartyAddress", objCashSalesReturnModel.PartyAddress); ClsCon.cmd.Parameters.AddWithValue("@PartyMobileNo", objCashSalesReturnModel.PartyMobileNo); ClsCon.cmd.Parameters.AddWithValue("@WareHouseID", objCashSalesReturnModel.WareHouseID); ClsCon.cmd.Parameters.AddWithValue("@TransName", objCashSalesReturnModel.TransName); ClsCon.cmd.Parameters.AddWithValue("@PONo", objCashSalesReturnModel.PONo); ClsCon.cmd.Parameters.AddWithValue("@PayMode", objCashSalesReturnModel.PayMode); ClsCon.cmd.Parameters.AddWithValue("@PayModeRemark", objCashSalesReturnModel.PayModeRemark); ClsCon.cmd.Parameters.AddWithValue("@CCCode", objCashSalesReturnModel.CCCode); ClsCon.cmd.Parameters.AddWithValue("@InvoiceSeries", objCashSalesReturnModel.InvoiceSeries); ClsCon.cmd.Parameters.AddWithValue("@PartyState", objCashSalesReturnModel.PartyState); //if (objCashSalesReturnModel.ds.Tables["DtCashSales"].Rows.Count > 0) //{ // ClsCon.cmd.Parameters.AddWithValue("@TblSale", objCashSalesReturnModel.ds.Tables["DtCashSales"]); //} //if (objCashSalesReturnModel.ds.Tables["DtItems"].Rows.Count > 0) //{ // ClsCon.cmd.Parameters.AddWithValue("@TblItems", objCashSalesReturnModel.ds.Tables["DtItems"]); //} //if (objCashSalesReturnModel.ds.Tables["DtSundries"].Rows.Count > 0) //{ // ClsCon.cmd.Parameters.AddWithValue("@TblSundries", objCashSalesReturnModel.ds.Tables["DtSundries"]); //} //if (objCashSalesReturnModel.ds.Tables["DtAdjAdvance"].Rows.Count > 0) //{ // ClsCon.cmd.Parameters.AddWithValue("@TblAdvanceDetail", objCashSalesReturnModel.ds.Tables["DtAdjAdvance"]); //} ClsCon.cmd.Parameters.AddWithValue("@TblSale", objCashSalesReturnModel.DtCashSales); ClsCon.cmd.Parameters.AddWithValue("@TblItems", objCashSalesReturnModel.DtItems); ClsCon.cmd.Parameters.AddWithValue("@TblSundries", objCashSalesReturnModel.DtSundries); // ClsCon.cmd.Parameters.AddWithValue("@TblAdvanceDetail", objCashSalesReturnModel.DtAdjAdvance); ClsCon.cmd.Parameters.AddWithValue("@BrokerageID", objCashSalesReturnModel.BrokerageID); ClsCon.cmd.Parameters.AddWithValue("@BrokerageRate", objCashSalesReturnModel.BrokerageRate); ClsCon.cmd.Parameters.AddWithValue("@BrokerageGSTIN", objCashSalesReturnModel.BrokerageGSTIN); ClsCon.cmd.Parameters.AddWithValue("@BrokerageAmount", objCashSalesReturnModel.BrokerageAmount); 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 SaveSalesVoucher(CompositionSalesModel ObjCompositionSalesModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSaleVoucher"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjCompositionSalesModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjCompositionSalesModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjCompositionSalesModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjCompositionSalesModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", ObjCompositionSalesModel.VchType); ClsCon.cmd.Parameters.AddWithValue("@EntryType", ObjCompositionSalesModel.EntryType); ClsCon.cmd.Parameters.AddWithValue("@User", ObjCompositionSalesModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", ObjCompositionSalesModel.IP); ClsCon.cmd.Parameters.AddWithValue("@ByCashSale", ObjCompositionSalesModel.ByCashSale); ClsCon.cmd.Parameters.AddWithValue("@PartyName", ObjCompositionSalesModel.PartyName); ClsCon.cmd.Parameters.AddWithValue("@PartyGSTIN", ObjCompositionSalesModel.PartyGSTIN); ClsCon.cmd.Parameters.AddWithValue("@PartyAddress", ObjCompositionSalesModel.PartyAddress); ClsCon.cmd.Parameters.AddWithValue("@WareHouseID", ObjCompositionSalesModel.WareHouseID); ClsCon.cmd.Parameters.AddWithValue("@TransName", ObjCompositionSalesModel.TransName); ClsCon.cmd.Parameters.AddWithValue("@PONo", ObjCompositionSalesModel.PONo); ClsCon.cmd.Parameters.AddWithValue("@InvoiceSeries", ObjCompositionSalesModel.InvoiceSeries); //for bank ClsCon.cmd.Parameters.AddWithValue("@PartyBank", ObjCompositionSalesModel.PartyBank); ClsCon.cmd.Parameters.AddWithValue("@PartyIFSC", ObjCompositionSalesModel.PartyIFSC); ClsCon.cmd.Parameters.AddWithValue("@TblSale", ObjCompositionSalesModel.DtSales); ClsCon.cmd.Parameters.AddWithValue("@TblItems", ObjCompositionSalesModel.DtItems); ClsCon.cmd.Parameters.AddWithValue("@TblSundries", ObjCompositionSalesModel.DtSundries); ClsCon.cmd.Parameters.AddWithValue("@TblAdvanceDetail", ObjCompositionSalesModel.DtAdjAdvance); 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 SaveSalesReturnVoucher(SalesReturnModel objSalesRModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSalesReturnVoucher"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", objSalesRModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objSalesRModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objSalesRModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objSalesRModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objSalesRModel.VchType); ClsCon.cmd.Parameters.AddWithValue("@EntryType", objSalesRModel.EntryType); ClsCon.cmd.Parameters.AddWithValue("@User", objSalesRModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", objSalesRModel.IP); ClsCon.cmd.Parameters.AddWithValue("@ByCashSale", objSalesRModel.ByCashSale); ClsCon.cmd.Parameters.AddWithValue("@PartyName", objSalesRModel.PartyName); ClsCon.cmd.Parameters.AddWithValue("@PartyGSTIN", objSalesRModel.PartyGSTIN); ClsCon.cmd.Parameters.AddWithValue("@PartyAddress", objSalesRModel.PartyAddress); ClsCon.cmd.Parameters.AddWithValue("@WareHouseID", objSalesRModel.WareHouseID); ClsCon.cmd.Parameters.AddWithValue("@TransName", objSalesRModel.TransName); ClsCon.cmd.Parameters.AddWithValue("@PONo", objSalesRModel.PONo); ClsCon.cmd.Parameters.AddWithValue("@DocDate", objSalesRModel.DocDate); ClsCon.cmd.Parameters.AddWithValue("@InvoiceSeries", objSalesRModel.InvoiceSeries); ClsCon.cmd.Parameters.AddWithValue("@CCCode", objSalesRModel.CCCode); ClsCon.cmd.Parameters.AddWithValue("@OrgVoucherNo", objSalesRModel.OrgVoucherNo); ClsCon.cmd.Parameters.AddWithValue("@OrgVoucherDate", objSalesRModel.OrgVoucherDate); //ClsCon.cmd.Parameters.AddWithValue("@TblSale", JsonConvert.DeserializeObject<DataTable>(objSalesRModel.DtSales)); //ClsCon.cmd.Parameters.AddWithValue("@TblItems", JsonConvert.DeserializeObject<DataTable>(objSalesRModel.DtItems)); //ClsCon.cmd.Parameters.AddWithValue("@TblSundries", JsonConvert.DeserializeObject<DataTable>(objSalesRModel.DtSundries)); ClsCon.cmd.Parameters.AddWithValue("@TblSale", objSalesRModel.DtSales); ClsCon.cmd.Parameters.AddWithValue("@TblItems", objSalesRModel.DtItems); ClsCon.cmd.Parameters.AddWithValue("@TblSundries", objSalesRModel.DtSundries); 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 UpdatePV(UpdatePurchaseVoucherModel objUpdPVModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPUpdatePurchaseVoucher"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objUpdPVModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", objUpdPVModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", objUpdPVModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUpdPVModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@VchType", objUpdPVModel.VchType); ClsCon.cmd.Parameters.AddWithValue("@EntryType", objUpdPVModel.EntryType); ClsCon.cmd.Parameters.AddWithValue("@User", objUpdPVModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", objUpdPVModel.IP); ClsCon.cmd.Parameters.AddWithValue("@ByCashSale", objUpdPVModel.ByCashSale); ClsCon.cmd.Parameters.AddWithValue("@PartyName", objUpdPVModel.PartyName); ClsCon.cmd.Parameters.AddWithValue("@PartyGSTIN", objUpdPVModel.PartyGSTIN); ClsCon.cmd.Parameters.AddWithValue("@PartyAddress", objUpdPVModel.PartyAddress); ClsCon.cmd.Parameters.AddWithValue("@WareHouseID", objUpdPVModel.WareHouseID); ClsCon.cmd.Parameters.AddWithValue("@AccCode", objUpdPVModel.AccCode); ClsCon.cmd.Parameters.AddWithValue("@PONo", objUpdPVModel.PONo); ClsCon.cmd.Parameters.AddWithValue("@PODate", objUpdPVModel.PODate); ClsCon.cmd.Parameters.AddWithValue("@PurchaseBillNo", objUpdPVModel.PurchaseBillNo); ClsCon.cmd.Parameters.AddWithValue("@PurchaseBillDate", objUpdPVModel.PurchaseBillDate); ClsCon.cmd.Parameters.AddWithValue("@GRNNo", objUpdPVModel.GRNNo); ClsCon.cmd.Parameters.AddWithValue("@GRNDate", objUpdPVModel.GRNDate); ClsCon.cmd.Parameters.AddWithValue("@PurchaseSaleRecordID", objUpdPVModel.PurchaseSaleRecordID); ClsCon.cmd.Parameters.AddWithValue("@DocNo", objUpdPVModel.VoucherNo); ClsCon.cmd.Parameters.AddWithValue("@DocDate", objUpdPVModel.VoucherDate); ClsCon.cmd.Parameters.AddWithValue("@CCCode", objUpdPVModel.CCCode); ClsCon.cmd.Parameters.AddWithValue("@IDARefNo", objUpdPVModel.IDARefNo); ClsCon.cmd.Parameters.AddWithValue("@BrokerageID", objUpdPVModel.BrokerageID); ClsCon.cmd.Parameters.AddWithValue("@BrokerageRate", objUpdPVModel.BrokerageRate); ClsCon.cmd.Parameters.AddWithValue("@BrokerageGSTIN", objUpdPVModel.BrokerageGSTIN); ClsCon.cmd.Parameters.AddWithValue("@BrokerageAmount", objUpdPVModel.BrokerageAmount); ClsCon.cmd.Parameters.AddWithValue("@DeptID", objUpdPVModel.DeptID); ClsCon.cmd.Parameters.AddWithValue("@SubDeptID", objUpdPVModel.SubDeptID); ClsCon.cmd.Parameters.AddWithValue("@IsAudit", objUpdPVModel.IsAudit); ClsCon.cmd.Parameters.AddWithValue("@IsSendToAudit", objUpdPVModel.IsSendToAudit); ClsCon.cmd.Parameters.AddWithValue("@BankPayVoucherInd", objUpdPVModel.BankPayVoucherInd); ClsCon.cmd.Parameters.AddWithValue("@TblPurchase", objUpdPVModel.DtUpdPurchase); ClsCon.cmd.Parameters.AddWithValue("@TblPurchaseItems", objUpdPVModel.DtUpdItems); ClsCon.cmd.Parameters.AddWithValue("@TblPurchaseSundries", objUpdPVModel.DtUpdSundries); 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 DataTable UpdateCompanyProfile(UpdateProfileCreationModel objUPCModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPUpdateClientProfile"; ClsCon.cmd.Parameters.AddWithValue("@Ind", objUPCModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@CompanyID", objUPCModel.CompanyID); ClsCon.cmd.Parameters.AddWithValue("@CompName", objUPCModel.CompName); ClsCon.cmd.Parameters.AddWithValue("@ShortName", objUPCModel.ShortName); ClsCon.cmd.Parameters.AddWithValue("@OrgType", objUPCModel.OrgType); ClsCon.cmd.Parameters.AddWithValue("@BusiNature", objUPCModel.BusiNature); ClsCon.cmd.Parameters.AddWithValue("@BusiType", objUPCModel.BusiType); ClsCon.cmd.Parameters.AddWithValue("@Addr", objUPCModel.Addr); ClsCon.cmd.Parameters.AddWithValue("@City", objUPCModel.City); ClsCon.cmd.Parameters.AddWithValue("@State", objUPCModel.State); ClsCon.cmd.Parameters.AddWithValue("@Pin", objUPCModel.Pin); ClsCon.cmd.Parameters.AddWithValue("@Phone", objUPCModel.Phone); ClsCon.cmd.Parameters.AddWithValue("@Fax", objUPCModel.Fax); ClsCon.cmd.Parameters.AddWithValue("@EMail", objUPCModel.EMail); ClsCon.cmd.Parameters.AddWithValue("@PAN", objUPCModel.PAN); ClsCon.cmd.Parameters.AddWithValue("@TAN", objUPCModel.TAN); ClsCon.cmd.Parameters.AddWithValue("@CIN", objUPCModel.CIN); ClsCon.cmd.Parameters.AddWithValue("@IECode", objUPCModel.IECode); ClsCon.cmd.Parameters.AddWithValue("@ExportCtg", objUPCModel.ExportCtg); ClsCon.cmd.Parameters.AddWithValue("@ContactName", objUPCModel.ContactName); ClsCon.cmd.Parameters.AddWithValue("@ContactDesg", objUPCModel.ContactDesg); ClsCon.cmd.Parameters.AddWithValue("@ContactEmail", objUPCModel.ContactEmail); ClsCon.cmd.Parameters.AddWithValue("@ContactMobile", objUPCModel.ContactMobile); ClsCon.cmd.Parameters.AddWithValue("@AltPerson", objUPCModel.AltPerson); ClsCon.cmd.Parameters.AddWithValue("@AltPersonDesg", objUPCModel.AltPersonDesg); ClsCon.cmd.Parameters.AddWithValue("@AltPersonEmail", objUPCModel.AltPersonEmail); ClsCon.cmd.Parameters.AddWithValue("@AltMobile", objUPCModel.AltMobile); ClsCon.cmd.Parameters.AddWithValue("@Composition", objUPCModel.Composition); ClsCon.cmd.Parameters.AddWithValue("@CompositionDate", objUPCModel.CompositionDate); ClsCon.cmd.Parameters.AddWithValue("@GSTIN", objUPCModel.GSTIN); ClsCon.cmd.Parameters.AddWithValue("@RegDate", objUPCModel.RegDate); ClsCon.cmd.Parameters.AddWithValue("@RegAddr", objUPCModel.RegAddr); ClsCon.cmd.Parameters.AddWithValue("@RegCity", objUPCModel.RegCity); ClsCon.cmd.Parameters.AddWithValue("@RegState", objUPCModel.RegState); ClsCon.cmd.Parameters.AddWithValue("@RegPin", objUPCModel.RegPin); ClsCon.cmd.Parameters.AddWithValue("@RegAuthPerson", objUPCModel.RegAuthPerson); ClsCon.cmd.Parameters.AddWithValue("@RegAuthDesg", objUPCModel.RegAuthDesg); ClsCon.cmd.Parameters.AddWithValue("@InvoiceNoSeries", objUPCModel.InvoiceNoSeries); ClsCon.cmd.Parameters.AddWithValue("@InvoiceOnPrePrinted", objUPCModel.InvoiceOnPrePrinted); ClsCon.cmd.Parameters.AddWithValue("@InvoiceNo", objUPCModel.InvoiceNo); ClsCon.cmd.Parameters.AddWithValue("@YrCD", objUPCModel.YrCD); ClsCon.cmd.Parameters.AddWithValue("@User", objUPCModel.User); ClsCon.cmd.Parameters.AddWithValue("@IP", objUPCModel.IP); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption1", objUPCModel.InvoiceCaption1); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint1", objUPCModel.InvoicePrint1); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption2", objUPCModel.InvoiceCaption2); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint2", objUPCModel.InvoicePrint2); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption3", objUPCModel.InvoiceCaption3); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint3", objUPCModel.InvoicePrint3); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption4", objUPCModel.InvoiceCaption4); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint4", objUPCModel.InvoicePrint4); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCaption5", objUPCModel.InvoiceCaption5); ClsCon.cmd.Parameters.AddWithValue("@InvoicePrint5", objUPCModel.InvoicePrint5); ClsCon.cmd.Parameters.AddWithValue("@CompanyLogo", objUPCModel.CompanyLogo); ClsCon.cmd.Parameters.AddWithValue("@ReportFormat", objUPCModel.ReportFormat); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopyNo", objUPCModel.InvoiceCopyNo); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy1Header", objUPCModel.InvoiceCopy1Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy2Header", objUPCModel.InvoiceCopy2Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy3Header", objUPCModel.InvoiceCopy3Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy4Header", objUPCModel.InvoiceCopy4Header); ClsCon.cmd.Parameters.AddWithValue("@InvoiceCopy5Header", objUPCModel.InvoiceCopy5Header); ClsCon.cmd.Parameters.AddWithValue("@CompositionCategoryID", objUPCModel.CompositionCategoryID); ClsCon.cmd.Parameters.AddWithValue("@CompositionTaxRate", objUPCModel.CompositionTaxRate); ClsCon.cmd.Parameters.AddWithValue("@StcokMaintaneByMinorUnit", objUPCModel.StcokMaintaneByMinorUnit); ClsCon.cmd.Parameters.AddWithValue("@CompanyType", objUPCModel.CompanyType); ClsCon.cmd.Parameters.AddWithValue("@TurnoverID", objUPCModel.TurnoverID); ClsCon.cmd.Parameters.AddWithValue("@TurnoverDescription", objUPCModel.TurnoverDescription); ClsCon.cmd.Parameters.AddWithValue("@PrintHSNSACCode", objUPCModel.PrintHSNSACCode); ClsCon.cmd.Parameters.AddWithValue("@BankName", objUPCModel.BankName); ClsCon.cmd.Parameters.AddWithValue("@IFSCCode", objUPCModel.IFSCCode); ClsCon.cmd.Parameters.AddWithValue("@AccountNumber", objUPCModel.AccountNumber); ClsCon.cmd.Parameters.AddWithValue("@ColumnNumber", objUPCModel.ColumnNumber); ClsCon.cmd.Parameters.AddWithValue("@HeadingColumn1", objUPCModel.HeadingColumn1); ClsCon.cmd.Parameters.AddWithValue("@HeadingColumn2", objUPCModel.HeadingColumn2); ClsCon.cmd.Parameters.AddWithValue("@HeadingColumn3", objUPCModel.HeadingColumn3); ClsCon.cmd.Parameters.AddWithValue("@HeadingColumn4", objUPCModel.HeadingColumn4); ClsCon.cmd.Parameters.AddWithValue("@HeadingColumn5", objUPCModel.HeadingColumn5); ClsCon.cmd.Parameters.AddWithValue("@BudgetAmount", objUPCModel.BudgetAmount); ClsCon.cmd.Parameters.AddWithValue("@UnRegistered", objUPCModel.UnRegistered); ClsCon.cmd.Parameters.AddWithValue("@SSIsTaken", objUPCModel.SSIsTaken); ClsCon.cmd.Parameters.AddWithValue("@BSObtain", objUPCModel.BSObtain); ClsCon.cmd.Parameters.AddWithValue("@CCCode", objUPCModel.CCCode); ClsCon.cmd.Parameters.AddWithValue("@BudgetConcept", objUPCModel.BudgetConcept); ClsCon.cmd.Parameters.AddWithValue("@BankPayChqSeriesInd", objUPCModel.BankPayChqSeriesInd); ClsCon.cmd.Parameters.AddWithValue("@TblTerms", objUPCModel.DtTerms); ClsCon.cmd.Parameters.AddWithValue("@TblSeries", objUPCModel.DtSeries); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtUpdProfileCreation = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtUpdProfileCreation); dtUpdProfileCreation.TableName = "success"; } catch (Exception) { dtUpdProfileCreation = new DataTable(); dtUpdProfileCreation.TableName = "error"; return(dtUpdProfileCreation); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtUpdProfileCreation); }
/// <summary> /// 读取菜单中的信息. /// </summary> /// <param name="treeV">TreeView控件</param> public void frm_show(int n) { switch (n)//通过标识调用各子窗体 { case 0: break; case 1: { frmPeopleInfo fp = new frmPeopleInfo(); //实例化一个frmPeopleInfo窗体 fp.strID = "want"; //设置窗体中的公共变量 fp.Text = "求租人员信息"; //设置窗体的名称 fp.ShowDialog(); //用模试对话框打开窗体 fp.Dispose(); //释放窗体的所有资原 break; } case 2: { frmPeopleInfo fp = new frmPeopleInfo(); fp.strID = "lend"; fp.Text = "出租人员信息设置"; fp.ShowDialog(); fp.Dispose(); break; } case 3: { frmPeopleList fp = new frmPeopleList(); fp.ShowDialog(); fp.Dispose(); break; } case 4: { frmSelect fs = new frmSelect(); fs.ShowDialog(); fs.Dispose(); break; } case 5: { frmStateHouse fs = new frmStateHouse(); fs.ShowDialog(); fs.Dispose(); break; } case 6: { frmIntend fi = new frmIntend(); fi.ShowDialog(); fi.Dispose(); break; } case 7: { frmEmploeey fe = new frmEmploeey(); fe.ShowDialog(); fe.Dispose(); break; } case 8: { frmEmpleeyAll fe = new frmEmpleeyAll(); fe.ShowDialog(); fe.Dispose(); break; } case 9: { frmType ft = new frmType(); ft.ShowDialog(); ft.Dispose(); break; } case 10: { frmFloor ff = new frmFloor(); ff.ShowDialog(); ff.Dispose(); break; } case 11: { frmSeat fs = new frmSeat(); fs.ShowDialog(); fs.Dispose(); break; } case 12: { frmFitment ff = new frmFitment(); ff.ShowDialog(); ff.Dispose(); break; } case 13: { frmFavor ff = new frmFavor(); ff.ShowDialog(); ff.Dispose(); break; } case 14: { frmMothed fm = new frmMothed(); fm.ShowDialog(); fm.Dispose(); break; } case 15: { frmMoney fm = new frmMoney(); fm.ShowDialog(); fm.Dispose(); break; } case 16: { frmMoneyRemark fmr = new frmMoneyRemark(); fmr.ShowDialog(); fmr.Dispose(); break; } case 17: { frmBargin fb = new frmBargin(); fb.ShowDialog(); fb.Dispose(); break; } case 21: { //打开记事本 System.Diagnostics.Process.Start("notepad.exe"); break; } case 22: { //打开计算器 System.Diagnostics.Process.Start("calc.exe"); break; } case 23: { //打开WORD文档 System.Diagnostics.Process.Start("WINWORD.EXE"); break; } case 24: { //打开EXCEL文件 System.Diagnostics.Process.Start("EXCEL.EXE"); break; } case 25: { frmChangYouSelfPwd fcy = new frmChangYouSelfPwd(); fcy.M_str_Name = this.tspname.Text.ToString(); fcy.ShowDialog(); fcy.Dispose(); break; } case 26: { if (MessageBox.Show("确认退出系统吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { Application.Exit(); //关闭当前工程 } break; } case 27: { frmStock fs = new frmStock(); fs.ShowDialog(); fs.Dispose(); break; } case 28: { frmRestore fr = new frmRestore(); fr.ShowDialog(); fr.Dispose(); break; } case 29: { ClsCon con = new ClsCon(); //实例化一个ClsCon公共类 con.ConDatabase(); //连接数据库 //调用一个清理出租人和房源之间的垃极信息 //如当出租人来要出租房时可是没有给出他房源信息这时出租人信息就没有用了 try { SqlCommand cmd = new SqlCommand(); //实例化一个SqlCommand类 cmd.Connection = con.conn; //与数据库建立关系统 cmd.Connection.Open(); //打开数据库的连接 cmd.CommandText = "proc_clear"; //存储过程的名 cmd.CommandType = CommandType.StoredProcedure; cmd.ExecuteNonQuery(); //执行存储过程 con.closeCon(); //关闭数据库的连接 MessageBox.Show("恭喜已清除!!!"); } catch (Exception ey) { MessageBox.Show(ey.Message); } break; } case 30: { //打开帮助对话框 MessageBox.Show("\t你可以到明日科技网站\t\n\n\t 得到你想知道的\n\t 谢谢使用!!"); break; } } }
internal DataTable SaveBudgetAmount(NewBudgetAmountModel ObjNewBudgetAmountModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPBudgetAmount"; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjNewBudgetAmountModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjNewBudgetAmountModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjNewBudgetAmountModel.BrID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjNewBudgetAmountModel.YrCode); ClsCon.cmd.Parameters.AddWithValue("@SectionCD", ObjNewBudgetAmountModel.SectionCD); ClsCon.cmd.Parameters.AddWithValue("@SubSectionCD", ObjNewBudgetAmountModel.SubSectionCD); ClsCon.cmd.Parameters.AddWithValue("@BudgetHeadCD", ObjNewBudgetAmountModel.BudgetHeadCD); ClsCon.cmd.Parameters.AddWithValue("@SecCode", ObjNewBudgetAmountModel.SecCode); ClsCon.cmd.Parameters.AddWithValue("@ActualUptoBudgetAmtDr", ObjNewBudgetAmountModel.ActualUptoBudgetAmtDr); ClsCon.cmd.Parameters.AddWithValue("@ActualUptoBudgetAmtCr ", ObjNewBudgetAmountModel.ActualUptoBudgetAmtCr); ClsCon.cmd.Parameters.AddWithValue("@Prop2BudgetAmtDr", ObjNewBudgetAmountModel.Prop2BudgetAmtDr); ClsCon.cmd.Parameters.AddWithValue("@Prop2BudgetAmtCr", ObjNewBudgetAmountModel.Prop2BudgetAmtCr); ClsCon.cmd.Parameters.AddWithValue("@Sanc2BudgetAmtDr", ObjNewBudgetAmountModel.Sanc2BudgetAmtDr); ClsCon.cmd.Parameters.AddWithValue("@Sanc2BudgetAmtCr", ObjNewBudgetAmountModel.Sanc2BudgetAmtCr); ClsCon.cmd.Parameters.AddWithValue("@PropLastQtrBudgetAmtDr", ObjNewBudgetAmountModel.PropLastQtrBudgetAmtDr); ClsCon.cmd.Parameters.AddWithValue("@PropLastQtrBudgetAmtCr", ObjNewBudgetAmountModel.PropLastQtrBudgetAmtCr); ClsCon.cmd.Parameters.AddWithValue("@PropBudgetAmtDr", ObjNewBudgetAmountModel.PropBudgetAmtDr); ClsCon.cmd.Parameters.AddWithValue("@PropBudgetAmtCr", ObjNewBudgetAmountModel.PropBudgetAmtCr); ClsCon.cmd.Parameters.AddWithValue("@PropBudgetCapitalAmtCr", ObjNewBudgetAmountModel.PropBudgetCapitalAmtCr); ClsCon.cmd.Parameters.AddWithValue("@PropBudgetCapitalAmtDr", ObjNewBudgetAmountModel.PropBudgetCapitalAmtDr); ClsCon.cmd.Parameters.AddWithValue("@PropBudgetRevenueAmtCr", ObjNewBudgetAmountModel.PropBudgetRevenueAmtCr); ClsCon.cmd.Parameters.AddWithValue("@PropBudgetRevenueAmtDr", ObjNewBudgetAmountModel.PropBudgetRevenueAmtDr); ClsCon.cmd.Parameters.AddWithValue("@UserID", ObjNewBudgetAmountModel.UserID); ClsCon.cmd.Parameters.AddWithValue("@IPAddr", ObjNewBudgetAmountModel.IP); 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; }