/// <summary> /// Description : Get the MSchedule Information /// Created By : Shiva /// Created Date : 30 June 2014 /// Modified By : /// Modified Date: /// </summary> public static BillingInfo GetMSchedule() { var GetMSchedule = new BillingInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetMSchedule"); var safe = new SafeDataReader(reader); while (reader.Read()) { var MSchedule = new Billing(); MSchedule.FetchBillingFrequencyOrMonthOrFeeInfo(MSchedule, safe); GetMSchedule.BillingList.Add(MSchedule); } return GetMSchedule; } catch (Exception ex) { log.Error("Error: " + ex); return GetMSchedule; } finally { log.Debug("End: " + methodBase.Name); } }
private Billing FetchBillingFrequencyOrMonthOrFeeInfo(Billing getBillingFrequencyAndMonth, SafeDataReader dr) { getBillingFrequencyAndMonth.ID = dr.GetInt32("ID"); getBillingFrequencyAndMonth.Code = dr.GetString("Code"); getBillingFrequencyAndMonth.Name = dr.GetString("Name"); return getBillingFrequencyAndMonth; }
/// <summary> /// Description : Get the MFEE in billing settings page /// Created By : Anji /// Created Date : 25 May 2015 /// Modified By : /// Modified Date: /// </summary> public static BillingInfo GetMFEEforClient(int ClientCode) { var GetMFee = new BillingInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[1]; sqlParams[0] = new SqlParameter("@ClientCode", ClientCode); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetMFeeForClient", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var MFee = new Billing(); MFee.FetchBillingFeeInfoClient(MFee, safe); GetMFee.BillingList.Add(MFee); } return GetMFee; } catch (Exception ex) { log.Error("Error: " + ex); return GetMFee; } finally { log.Debug("End: " + methodBase.Name); } }
private Billing FetchBillingFeeInfoClient(Billing getBillingFrequencyAndMonth, SafeDataReader dr) { getBillingFrequencyAndMonth.ID = dr.GetInt32("ID"); getBillingFrequencyAndMonth.Code = dr.GetString("Code"); getBillingFrequencyAndMonth.Name = dr.GetString("Name"); getBillingFrequencyAndMonth.NeedSecurityDeposit = dr.GetBoolean("NeedSecurityDeposit"); getBillingFrequencyAndMonth.IsExists = dr.GetInt32("IsExists"); getBillingFrequencyAndMonth.FeeType = dr.GetString("FeeType"); return getBillingFrequencyAndMonth; }