SqlParameter[] GetParameters(System.Int32 argTransactionType, DateTime DtFrom, DateTime DtTill, Workshop wrk, Office off, AssessmentType argAssessmentType, Model argModel) { SqlParameter[] parrSP = new SqlParameter[26]; parrSP[0] = new SqlParameter("@Action", argTransactionType); return(parrSP); }
SqlParameter[] GetParameters(System.Int32 argTransactionType, DateTime DtFrom, DateTime DtTill, Workshop wrk, Office off, AssessmentType argAssessmentType, Model argModel) { //@Action int = 0 OUTPUT, //@BillId int = 0, //@BillNo varchar (10) = '', //@DtBill datetime = '20070101', //@Total real = 0, //@ServiceTaxRate real = 0, //@ServiceTax decimal = 0, //@EducationCessRate real = 0, //@EducationCess decimal = 0, //@GrandTotal real = 0, //@AssessmentId int = 0, //@WorkshopId int = 0, //@OfficeId int = 0, //@ModelId int = 0, //@AssessmentTypeId int = 0, //@DtFrom datetime ='20070101 00:00', //@DtTill datetime ='20080101 00:00' SqlParameter[] parrSP = new SqlParameter[26]; parrSP[0] = new SqlParameter("@Action", argTransactionType); parrSP[1] = new SqlParameter("@BillId", BillId); parrSP[2] = new SqlParameter("@BillNo", BillNo); parrSP[3] = new SqlParameter("@DtBill", DtBill); parrSP[4] = new SqlParameter("@Total", Total); parrSP[5] = new SqlParameter("@ServiceTaxRate", ServiceTaxRate); parrSP[6] = new SqlParameter("@ServiceTax", ServiceTax); parrSP[7] = new SqlParameter("@EducationCessRate", EducationCessRate); parrSP[8] = new SqlParameter("@EducationCess", EducationCess); parrSP[9] = new SqlParameter("@GrandTotal", GrandTotal); parrSP[10] = new SqlParameter("@AssessmentId", Assessment.AssessmentId); parrSP[11] = new SqlParameter("@WorkshopId", wrk == null ? 0 : wrk.WorkshopId); parrSP[12] = new SqlParameter("@OfficeId", off == null ? 0 : off.OfficeId); parrSP[13] = new SqlParameter("@ModelId", argModel == null ? 0 : argModel.ModelId); parrSP[14] = new SqlParameter("@AssessmentTypeId", argAssessmentType == null ? 0 : argAssessmentType.AssessmentTypeId); parrSP[15] = new SqlParameter("@DtFrom", DtFrom); parrSP[16] = new SqlParameter("@DtTill", DtTill); parrSP[17] = new SqlParameter("@StateCode", StateCode == null ? "0" : StateCode); parrSP[18] = new SqlParameter("@SGST", SGST); parrSP[19] = new SqlParameter("@SGSTRate", SGSTRate); parrSP[20] = new SqlParameter("@CGST", CGST); parrSP[21] = new SqlParameter("@CGSTRate", CGSTRate); parrSP[22] = new SqlParameter("@UGST", UGST); parrSP[23] = new SqlParameter("@UGSTRate", UGSTRate); parrSP[24] = new SqlParameter("@IGST", IGST); parrSP[25] = new SqlParameter("@IGSTRate", IGSTRate); return(parrSP); }
SqlParameter[] GetParameters(System.Int32 argTransactionType, DateTime DtFrom, DateTime DtTill, Workshop wrk, Office off, AssessmentType argAssessmentType, Model argModel) { SqlParameter[] parrSP = new SqlParameter[32]; parrSP[0] = new SqlParameter("@Action", argTransactionType); parrSP[1] = new SqlParameter("@ReceiptId", ReceiptId); parrSP[2] = new SqlParameter("@DtCheque", DtCheque); parrSP[3] = new SqlParameter("@Bank", Bank); parrSP[4] = new SqlParameter("@SlipNo", SlipNo); parrSP[5] = new SqlParameter("@DtSlip", DtSlip); parrSP[6] = new SqlParameter("@ChequeNo", ChequeNo); parrSP[7] = new SqlParameter("@TotalReceipt", NetReceipt); parrSP[8] = new SqlParameter("@ServiceTax", ServiceTax); parrSP[9] = new SqlParameter("@EducationTax", EducationTax); parrSP[10] = new SqlParameter("@ChequeAmount", ChequeAmount); parrSP[11] = new SqlParameter("@BillId", Bill.BillId); parrSP[12] = new SqlParameter("@AssessmentId", Assessment.AssessmentId); parrSP[13] = new SqlParameter("@TDS", TDS); parrSP[14] = new SqlParameter("@WorkshopId", wrk == null ? 0 : wrk.WorkshopId); parrSP[15] = new SqlParameter("@OfficeId", off == null ? 0 : off.OfficeId); parrSP[16] = new SqlParameter("@ModelId", argModel == null ? 0 : argModel.ModelId); parrSP[17] = new SqlParameter("@AssessmentTypeId", argAssessmentType == null ? 0 : argAssessmentType.AssessmentTypeId); parrSP[18] = new SqlParameter("@DtFrom", DtFrom); parrSP[19] = new SqlParameter("@DtTill", DtTill); parrSP[20] = new SqlParameter("@EduCessRate", mEduCessRate); parrSP[21] = new SqlParameter("@ServiceTaxRate", mServiceTaxRate); parrSP[22] = new SqlParameter("@TDSRate", mTDSRate); parrSP[23] = new SqlParameter("@TotalFeePaid", mTotalFeePaid); parrSP[24] = new SqlParameter("@CGST", mCGST); parrSP[25] = new SqlParameter("@CGSTRate", mCGSTRate); parrSP[27] = new SqlParameter("@SGST", mSGST); parrSP[26] = new SqlParameter("@SGSTRate", mSGSTRate); parrSP[28] = new SqlParameter("@IGST", mIGST); parrSP[29] = new SqlParameter("@IGSTRate", mIGSTRate); parrSP[30] = new SqlParameter("@UGST", mUGST); parrSP[31] = new SqlParameter("@UGSTRate", mUGSTRate); return(parrSP); }
public FeeSchedule(String argConnection, Int32 argFeeScheduleId) { mConnection = argConnection; string pstrSql = "SELECT * FROM FeeSchedule WHERE FeeScheduleId=" + argFeeScheduleId; SqlDataReader dr = SqlHelper.ExecuteReader(Connection, CommandType.Text, pstrSql); if (dr.Read()) { mFeeScheduleId = (System.Int32)dr["FeeScheduleId"]; mInsuranceCompany = new InsuranceCompany(Connection, (int)dr["InsuranceCompanyId"]); mAssessmentType = new AssessmentType(Connection, (int)dr["AssessmentTypeId"]); mDtWEF = (System.DateTime)dr["DtWEF"]; mIsEstimateBased = (System.Boolean)dr["IsEstimateBased"]; } else { Exception ex = new Exception("Identifier does not exist."); ex.Source = "FeeSchedule.FeeSchedule()"; throw ex; } dr.Close(); }
public System.Data.DataTable Items(DateTime DtFrom, DateTime DtTill, Workshop wrk, Office off, AssessmentType argAssessmentType, Model argModel) { try { SqlParameter[] parrSP = GetParameters(4, DtFrom, DtTill, wrk, off, argAssessmentType, argModel); DataSet ds = SqlHelper.ExecuteDataset(Connection, "uspBankAccount", parrSP); return(ds.Tables[0]); } catch (Exception ex) { //OSN.Generic.EventLogHelper appLog = new OSN.Generic.EventLogHelper(); //appLog.Source = "Communique"; //StringBuilder sb = new StringBuilder(); //sb.Append("public System.Data.DataTable Items()"); //sb.Append("Exception=" + ex.Message); //appLog.WriteEntry(sb.ToString()); return(new DataTable()); } }
public FeeSchedule(String argConnection, AssessmentType assessmentType, Office office, DateTime dtAsOn) { mConnection = argConnection; string pstrSql = System.String.Format("SELECT * FROM FeeSchedule WHERE AssessmentTypeId={0} AND InsuranceCompanyId={1} AND DtWEF <= '{2:yyyyMMdd}' ORDER BY DtWEF DESC", assessmentType.AssessmentTypeId, office.InsuranceCompany.InsuranceCompanyId, dtAsOn); SqlDataReader dr = SqlHelper.ExecuteReader(Connection, CommandType.Text, pstrSql); if (dr.Read()) { mFeeScheduleId = (System.Int32)dr["FeeScheduleId"]; mInsuranceCompany = new InsuranceCompany(Connection, (int)dr["InsuranceCompanyId"]); mAssessmentType = new AssessmentType(Connection, (int)dr["AssessmentTypeId"]); mDtWEF = (System.DateTime)dr["DtWEF"]; mIsEstimateBased = (System.Boolean)dr["IsEstimateBased"]; } else { Exception ex = new Exception("Identifier does not exist."); ex.Source = "FeeSchedule.FeeSchedule()"; throw ex; } dr.Close(); }