Ejemplo n.º 1
0
        /// <summary>
        /// Description  : Get the ClientFeeSetting and ClientFeeMapping Information by ClientCode
        /// Created By   : Shiva
        /// Created Date : 2nd July 2014
        /// Modified By  : Shiva
        /// Modified Date: 4 July 2014
        /// </summary>
        public static BillingInfo GetFeeSettingAndMappingsByClientCode(int ClientCode, string SourceID)
        {
            var GetFeeSettingAndMappingInfo = 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[2];
                sqlParams[0] = new SqlParameter("@ClientCode", ClientCode);
                sqlParams[1] = new SqlParameter("@SourceID", SourceID);

                var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SPGetFeeSettingAndMappingsByClientCode", sqlParams);
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    var feeSetting = new FeeSetting();
                    feeSetting.FetchClientFeeSettingInfo(feeSetting, safe);
                    GetFeeSettingAndMappingInfo.ClientFeeSettingList.Add(feeSetting);
                }
                reader.NextResult();
                while (reader.Read())
                {
                    var feeMapping = new FeeMapping();
                    feeMapping.FetchClientFeeMappingInfo(feeMapping, safe);
                    GetFeeSettingAndMappingInfo.ClientFeeMappingList.Add(feeMapping);
                }
                return GetFeeSettingAndMappingInfo;
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return GetFeeSettingAndMappingInfo;
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }
Ejemplo n.º 2
0
 public FeeMapping FetchClientFeeMappingInfo(FeeMapping getClientFeeMappingInfo, SafeDataReader dr)
 {
     getClientFeeMappingInfo.CFMID = dr.GetInt32("ID");
     getClientFeeMappingInfo.BillingFrequency = dr.GetString("BillingFrequency");
     getClientFeeMappingInfo.BillingMonth = dr.GetString("BillingMonth");
     getClientFeeMappingInfo.IsBillArrears = dr.GetBoolean("IsBillArrears");
     getClientFeeMappingInfo.Status = dr.GetString("Status");
     getClientFeeMappingInfo.FeeCode = dr.GetString("FeeCode");
     getClientFeeMappingInfo.SecurityDeposit = dr.GetDecimal("SecurityDeposit");
     getClientFeeMappingInfo.SecurityDepositInvoiceNo = dr.GetString("SecurityDepositInvoiceNo");
     getClientFeeMappingInfo.FeeDueToNominee = dr.GetString("FeeDueToNominee");
     return getClientFeeMappingInfo;
 }