/// <summary> /// 获取T_FB_REPAYAPPLYDETAIL信息 /// </summary> /// <param name="strRepayApplyDetailId">主键索引</param> /// <returns></returns> public T_FB_REPAYAPPLYDETAIL GetRepayApplyDetailByID(string strRepayApplyDetailId) { if (string.IsNullOrEmpty(strRepayApplyDetailId)) { return(null); } RepayApplyDetailDAL dalRepayApplyDetail = new RepayApplyDetailDAL(); StringBuilder strFilter = new StringBuilder(); List <string> objArgs = new List <string>(); if (!string.IsNullOrEmpty(strRepayApplyDetailId)) { strFilter.Append(" REPAYAPPLYDETAILID == @0"); objArgs.Add(strRepayApplyDetailId); } try { T_FB_REPAYAPPLYDETAIL entRd = dalRepayApplyDetail.GetRepayApplyDetailRdByMultSearch(strFilter.ToString(), objArgs.ToArray()); return(entRd); } catch (Exception ex) { string ErrInfo = this.GetType().ToString() + ":GetRepayApplyDetailByID," + System.DateTime.Now.ToString() + "," + ex.Message; Tracer.Debug(ErrInfo); } return(null); }
/// <summary> /// 根据条件,获取T_FB_REPAYAPPLYDETAIL信息 /// </summary> /// <param name="strVacName"></param> /// <param name="strVacYear"></param> /// <param name="strCountyType"></param> /// <param name="strSortKey"></param> /// <returns></returns> public static IQueryable <T_FB_REPAYAPPLYDETAIL> GetAllRepayApplyDetailRdListByMultSearch(string strFilter, List <object> objArgs, string strSortKey) { RepayApplyDetailDAL dalRepayApplyDetail = new RepayApplyDetailDAL(); string strOrderBy = string.Empty; if (!string.IsNullOrEmpty(strSortKey)) { strOrderBy = strSortKey; } else { strOrderBy = " REPAYAPPLYDETAILID "; } try { var q = dalRepayApplyDetail.GetRepayApplyDetailRdListByMultSearch(strOrderBy, strFilter, objArgs.ToArray()); return(q); } catch (Exception ex) { string ErrInfo = new RepayApplyDetailBLL().GetType().ToString() + ":GetAllRepayApplyDetailRdListByMultSearch," + System.DateTime.Now.ToString() + "," + ex.Message; Tracer.Debug(ErrInfo); } return(null); }
/// <summary> /// 根据主表ID获取T_FB_REPAYAPPLYDETAIL信息 add by zl /// </summary> /// <param name="strRepayApplyMasterId"></param> /// <returns></returns> public List <T_FB_REPAYAPPLYDETAIL> GetRepayApplyDetailByMasterID(string strRepayApplyMasterId) { if (string.IsNullOrEmpty(strRepayApplyMasterId)) { return(null); } RepayApplyDetailDAL dalRepayApplyDetail = new RepayApplyDetailDAL(); StringBuilder strFilter = new StringBuilder(); List <string> objArgs = new List <string>(); List <T_FB_REPAYAPPLYDETAIL> repList = new List <T_FB_REPAYAPPLYDETAIL>(); if (!string.IsNullOrEmpty(strRepayApplyMasterId)) { strFilter.Append(" T_FB_REPAYAPPLYMASTER.REPAYAPPLYMASTERID == @0"); objArgs.Add(strRepayApplyMasterId); } try { IQueryable <T_FB_REPAYAPPLYDETAIL> entRds = GetRepayApplySubjectDetailRdList("UPDATEDATE", strFilter.ToString(), objArgs.ToArray()); if (entRds == null) { return(null); } //add zl 12.29 取实时的借款余额 foreach (T_FB_REPAYAPPLYDETAIL da in entRds) { if (da.T_FB_REPAYAPPLYMASTER.CHECKSTATES != 2) { var a = from i in dal.GetObjects <T_FB_PERSONACCOUNT>() where i.OWNERCOMPANYID == da.T_FB_REPAYAPPLYMASTER.OWNERCOMPANYID && i.OWNERID == da.T_FB_REPAYAPPLYMASTER.OWNERID select i; if (da.REPAYTYPE == 1) { da.BORROWMONEY = a.FirstOrDefault().SIMPLEBORROWMONEY.Value; } if (da.REPAYTYPE == 2) { da.BORROWMONEY = a.FirstOrDefault().BACKUPBORROWMONEY.Value; } if (da.REPAYTYPE == 3) { da.BORROWMONEY = a.FirstOrDefault().SPECIALBORROWMONEY.Value; } } repList.Add(da); } //add end //if (entRds.Count() == 0) //{ // return null; //} //return entRds.ToList(); return(repList); } catch (Exception ex) { string ErrInfo = this.GetType().ToString() + ":GetRepayApplyDetailByMasterID," + System.DateTime.Now.ToString() + "," + ex.Message; Tracer.Debug(ErrInfo); } return(null); }