Example #1
0
        /// <summary>
        /// 修改实体审核状态
        /// </summary>
        /// <param name="strEntityName">实体名</param>
        /// <param name="EntityKeyName">主键名</param>
        /// <param name="EntityKeyValue">主键值</param>
        /// <param name="CheckState">审核状态</param>
        public int UpdateCheckState(string strEntityName, string EntityKeyName, string EntityKeyValue, string CheckState)
        {
            using (CommDal <TEntity> dal = new CommDal <TEntity>())
            {
                int intResult = 0;
                Tracer.Debug("进入了COMMONBLL,实体名:" + strEntityName + ",DateTime:" + System.DateTime.Now.ToString());
                Tracer.Debug("实体ID名:" + EntityKeyName + "实体主键值:" + EntityKeyValue);
                Tracer.Debug("审核的状态:" + CheckState);
                switch (strEntityName)
                {
                case "T_FB_BORROWAPPLYMASTER":    //借款申请
                    BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                    intResult = bll.GetBorrowApplyForMobile(EntityKeyValue, CheckState);
                    break;

                case "T_FB_CHARGEAPPLYMASTER":
                    ChargeApplyMasterBLL Chargebll = new ChargeApplyMasterBLL();
                    intResult = Chargebll.GetChargeApplyForMobile(EntityKeyValue, CheckState);
                    break;

                case "T_FB_REPAYAPPLYMASTER":
                    RepayApplyMasterBLL Repaybll = new RepayApplyMasterBLL();
                    intResult = Repaybll.GetRepayApplyForMobile(EntityKeyValue, CheckState);
                    break;

                default:
                    intResult = dal.UpdateCheckState(strEntityName, EntityKeyName, EntityKeyValue, CheckState);
                    break;
                }


                return(intResult);
            }
        }
Example #2
0
 public string GetBorrowApplyMasterXMLString(string formid, ref string BorrowCode)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         return(borrowBLL.GetXmlString(formid, ref BorrowCode));
     }
 }
Example #3
0
 public void UptBorrowApplyMasterAndDetailForMobile(string strActionType, T_FB_BORROWAPPLYMASTER borrowMaster,
                                                    List <T_FB_BORROWAPPLYDETAIL> borrowDetails, ref string strMsg)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         borrowBLL.UptBorrowApplyMasterAndDetailForMobile(strActionType, borrowMaster, borrowDetails, ref strMsg);
     }
 }
Example #4
0
 public bool AddBorrowApplyMasterAndDetail(T_FB_BORROWAPPLYMASTER borrowMaster, List <T_FB_BORROWAPPLYDETAIL> borrowDetail)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         bool re;
         re = borrowBLL.AddBorrowApplyMasterAndDetail(borrowMaster, borrowDetail);
         return(re);
     }
 }
Example #5
0
 public bool AddBorrowApplyMasterAndDetailForMobile(T_FB_BORROWAPPLYMASTER borrowMaster, List <T_FB_BORROWAPPLYDETAIL> borrowDetail, ref string strMsg)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         SMT.Foundation.Log.Tracer.Debug("调用了AddBorrowApplyMasterAndDetailForMobile");
         bool re;
         re = borrowBLL.AddBorrowApplyMasterAndDetailForMobile(borrowMaster, borrowDetail, ref strMsg);
         return(re);
     }
 }
Example #6
0
        public T_FB_BORROWAPPLYMASTER GetBorrowApplyMasterByID(string strBorrowApplyMasterId)
        {
            T_FB_BORROWAPPLYMASTER entRd = new T_FB_BORROWAPPLYMASTER();

            using (BorrowApplyMasterBLL bllBorrowApplyMaster = new BorrowApplyMasterBLL())
            {
                entRd = bllBorrowApplyMaster.GetBorrowApplyMasterByID(strBorrowApplyMasterId);
                return(entRd);
            }
        }
Example #7
0
 public bool UptBorrowApplyCheckState(T_FB_BORROWAPPLYMASTER entity, List <T_FB_BORROWAPPLYDETAIL> borrowDetail)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         bool   re   = true;
         string sMsg = borrowBLL.UptBorrowApplyCheckState(entity, borrowDetail);
         if (!string.IsNullOrEmpty(sMsg))
         {
             re = false;
         }
         return(re);
     }
 }
Example #8
0
 public bool DelBorrowApplyMasterAndDetail(List <string> borrowMasterID)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         foreach (string obj in borrowMasterID)
         {
             if (!borrowBLL.DelBorrowApplyMasterAndDetail(obj))
             {
                 return(false);
             }
         }
         return(true);
     }
 }
Example #9
0
        public List<T_FB_BORROWAPPLYMASTER> GetBorrowApplyMasterListForRepay(string strOwnerID, decimal dIsRepaied, decimal dCheckStates, string strFilter, List<object> objArgs)
        {
            IQueryable<T_FB_BORROWAPPLYMASTER> entIq;
            IList<T_FB_BORROWAPPLYMASTER> entList = new List<T_FB_BORROWAPPLYMASTER>();
            BorrowApplyMasterBLL bllBorrowApplyMaster = new BorrowApplyMasterBLL();
            entIq = bllBorrowApplyMaster.GetBorrowApplyMasterListForRepay(strOwnerID, dIsRepaied, dCheckStates, strFilter, objArgs);
            if (entIq == null)
            {
                return null;
            }

            entList = entIq.ToList();
            return entList != null ? entList.ToList() : null;
        }
Example #10
0
        public List <T_FB_BORROWAPPLYMASTER> GetBorrowApplyMasterListForRepay(string strOwnerID, decimal dIsRepaied, decimal dCheckStates, string strFilter, List <object> objArgs)
        {
            IQueryable <T_FB_BORROWAPPLYMASTER> entIq;
            IList <T_FB_BORROWAPPLYMASTER>      entList = new List <T_FB_BORROWAPPLYMASTER>();
            BorrowApplyMasterBLL bllBorrowApplyMaster   = new BorrowApplyMasterBLL();

            entIq = bllBorrowApplyMaster.GetBorrowApplyMasterListForRepay(strOwnerID, dIsRepaied, dCheckStates, strFilter, objArgs);
            if (entIq == null)
            {
                return(null);
            }

            entList = entIq.ToList();
            return(entList != null?entList.ToList() : null);
        }
Example #11
0
        public bool DelMasterDataById(ObservableCollection <string> masterList)
        {
            bool flag = false;

            if ((masterList != null) && (masterList.Count() > 0))
            {
                BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                flag = bll.DelMasterDataById(masterList);
            }
            else
            {
                flag = false;
            }
            return(flag);
        }
Example #12
0
        public bool UpdBorrowApply(T_FB_BORROWAPPLYMASTER updataKey)
        {
            bool flag = false;

            if (updataKey != null)
            {
                BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                flag = bll.UpdBorrowApply(updataKey);
            }
            else
            {
                flag = false;
            }
            return(flag);
        }
Example #13
0
        public bool AddBorrowApply(T_FB_BORROWAPPLYMASTER masterKey)
        {
            bool flag = false;

            if (masterKey != null)
            {
                BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                flag = bll.AddBorrowApply(masterKey);
            }
            else
            {
                flag = false;
            }
            return(flag);
        }
Example #14
0
        public T_FB_BORROWAPPLYMASTER GetChildData(string borrowKey)
        {
            T_FB_BORROWAPPLYMASTER borrowEntity;

            if (!string.IsNullOrEmpty(borrowKey))
            {
                BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                borrowEntity = bll.GetChildData(borrowKey);
            }
            else
            {
                borrowEntity = null;
            }
            return(borrowEntity != null ? borrowEntity : null);
        }
Example #15
0
        public List <T_FB_BORROWAPPLYMASTER> GetMasterData(string employeeID)
        {
            List <T_FB_BORROWAPPLYMASTER> masterList = null;

            if (!string.IsNullOrEmpty(employeeID))
            {
                BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                masterList = bll.GetMasterData(employeeID);
            }
            else
            {
                masterList = null;
            }
            return(masterList != null && masterList.Count() > 0 ? masterList : null);
        }
Example #16
0
        /// <summary>
        /// 更新借款明细记录
        /// </summary>
        /// <param name="strBorrowMasterID"></param>
        /// <param name="detailList"></param>
        /// <returns></returns>
        public bool UpdateBorrowApplyDetail(string strBorrowMasterID, List <T_FB_BORROWAPPLYDETAIL> detailList)
        {
            bool bRes = false;

            try
            {
                if (string.IsNullOrWhiteSpace(strBorrowMasterID))
                {
                    return(bRes);
                }


                BorrowApplyMasterBLL   masterBLL = new BorrowApplyMasterBLL();
                T_FB_BORROWAPPLYMASTER entMaster = masterBLL.GetBorrowApplyMasterByID(strBorrowMasterID);

                bRes = DelBorrowApplyDetail(strBorrowMasterID);

                foreach (T_FB_BORROWAPPLYDETAIL item in detailList)
                {
                    if (item.EntityKey != null)
                    {
                        item.EntityKey = null;
                    }

                    item.BORROWAPPLYDETAILID = System.Guid.NewGuid().ToString();
                    if (item.T_FB_BORROWAPPLYMASTER == null)
                    {
                        item.T_FB_BORROWAPPLYMASTER = entMaster;
                    }
                    item.T_FB_BORROWAPPLYMASTER.EntityKey = new System.Data.EntityKey("TM_SaaS_OA_EFModelContext.T_FB_BORROWAPPLYMASTER", "BORROWAPPLYMASTERID", entMaster.BORROWAPPLYMASTERID);
                    Tracer.Debug("开始修改");
                    if (item.T_FB_SUBJECT != null)
                    {
                        item.T_FB_SUBJECT.EntityKey = new System.Data.EntityKey("TM_SaaS_OA_EFModelContext.T_FB_SUBJECT", "SUBJECTID", item.T_FB_SUBJECT.SUBJECTID);
                    }
                    Tracer.Debug("开始添加");
                    Add(item);
                }
                bRes = true;
            }
            catch (Exception ex)
            {
                Tracer.Debug(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "调用函数 UpdateBorrowApplyDetail 出现异常,异常信息为:" + ex.ToString());
                bRes = false;
            }

            return(bRes);
        }
Example #17
0
        public List <T_FB_BORROWAPPLYMASTER> GetBorrowApplyMasterListByMultSearch(string userID, string strDateStart, string strDateEnd,
                                                                                  string checkState, string strFilter, List <object> objArgs, string strSortKey, int pageIndex, int pageSize, ref int pageCount)
        {
            IQueryable <T_FB_BORROWAPPLYMASTER> entIq;
            IList <T_FB_BORROWAPPLYMASTER>      entList = new List <T_FB_BORROWAPPLYMASTER>();

            using (BorrowApplyMasterBLL bllBorrowApplyMaster = new BorrowApplyMasterBLL())
            {
                entIq = bllBorrowApplyMaster.GetBorrowApplyMasterRdListByMultSearch(userID, strDateStart, strDateEnd,
                                                                                    checkState, strFilter, objArgs, strSortKey, pageIndex, pageSize, ref pageCount);
                if (entIq == null)
                {
                    return(null);
                }

                entList = entIq.ToList();
                return(entList != null?entList.ToList() : null);
            }
        }
Example #18
0
 public List<T_FB_BORROWAPPLYMASTER> GetMasterData(string employeeID)
 {
     List<T_FB_BORROWAPPLYMASTER> masterList = null;
     if (!string.IsNullOrEmpty(employeeID))
     {
         BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
         masterList = bll.GetMasterData(employeeID);
     }
     else
     {
         masterList = null;
     }
     return masterList != null && masterList.Count() > 0 ? masterList : null;
 }
Example #19
0
 public string GetBorrowApplyMasterXMLString(string formid, ref string BorrowCode)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         return borrowBLL.GetXmlString(formid,ref BorrowCode);
     }
 }
Example #20
0
 public void UptBorrowApplyMasterAndDetailForMobile(string strActionType, T_FB_BORROWAPPLYMASTER borrowMaster,
     List<T_FB_BORROWAPPLYDETAIL> borrowDetails, ref string strMsg)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         
         borrowBLL.UptBorrowApplyMasterAndDetailForMobile(strActionType, borrowMaster, borrowDetails, ref strMsg);
     }
 }
Example #21
0
 public bool AddBorrowApplyMasterAndDetailForMobile(T_FB_BORROWAPPLYMASTER borrowMaster, List<T_FB_BORROWAPPLYDETAIL> borrowDetail,ref string strMsg)
 {
     using (BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         SMT.Foundation.Log.Tracer.Debug("调用了AddBorrowApplyMasterAndDetailForMobile");
         bool re;
         re = borrowBLL.AddBorrowApplyMasterAndDetailForMobile(borrowMaster, borrowDetail, ref strMsg);
         return re;
     }
 }
Example #22
0
 public bool DelBorrowApplyMasterAndDetail(List<string> borrowMasterID)
 {
    using(BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
    {
        foreach (string obj in borrowMasterID)
        {
            if (!borrowBLL.DelBorrowApplyMasterAndDetail(obj))
            {
                return false;
            }
        }
        return true;
    }
 }
Example #23
0
 public bool UptBorrowApplyCheckState(T_FB_BORROWAPPLYMASTER entity, List<T_FB_BORROWAPPLYDETAIL> borrowDetail)
 {
     using(BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         bool re = true;
         string sMsg = borrowBLL.UptBorrowApplyCheckState(entity, borrowDetail);
         if (!string.IsNullOrEmpty(sMsg))
         {
             re = false;
         }
         return re;
     }
 }
Example #24
0
        public List<T_FB_BORROWAPPLYMASTER> GetBorrowApplyMasterListByMultSearch(string userID, string strDateStart, string strDateEnd,
            string checkState, string strFilter, List<object> objArgs, string strSortKey, int pageIndex, int pageSize, ref int pageCount)
        {
            IQueryable<T_FB_BORROWAPPLYMASTER> entIq;
            IList<T_FB_BORROWAPPLYMASTER> entList = new List<T_FB_BORROWAPPLYMASTER>();
            using(BorrowApplyMasterBLL bllBorrowApplyMaster = new BorrowApplyMasterBLL())
            {
                entIq = bllBorrowApplyMaster.GetBorrowApplyMasterRdListByMultSearch(userID, strDateStart, strDateEnd,
                            checkState, strFilter, objArgs, strSortKey, pageIndex, pageSize, ref pageCount);
                if (entIq == null)
                {
                    return null;
                }

                entList = entIq.ToList();
                return entList != null ? entList.ToList() : null;
            }
        }
Example #25
0
 public bool AddBorrowApplyMasterAndDetail(T_FB_BORROWAPPLYMASTER borrowMaster, List<T_FB_BORROWAPPLYDETAIL> borrowDetail)
 {
     using(BorrowApplyMasterBLL borrowBLL = new BorrowApplyMasterBLL())
     {
         bool re;
         re = borrowBLL.AddBorrowApplyMasterAndDetail(borrowMaster, borrowDetail);
         return re;
     }
 }
Example #26
0
 public T_FB_BORROWAPPLYMASTER GetBorrowApplyMasterByID(string strBorrowApplyMasterId)
 {
     T_FB_BORROWAPPLYMASTER entRd = new T_FB_BORROWAPPLYMASTER();
     using(BorrowApplyMasterBLL bllBorrowApplyMaster = new BorrowApplyMasterBLL())
     {
         entRd = bllBorrowApplyMaster.GetBorrowApplyMasterByID(strBorrowApplyMasterId);
         return entRd;
     }
 }
Example #27
0
 public bool DelMasterDataById(ObservableCollection<string> masterList)
 {
     bool flag = false;
     if ((masterList != null) && (masterList.Count() > 0))
     {
         BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
         flag = bll.DelMasterDataById(masterList);
     }
     else
     {
         flag = false;
     }
     return flag;
 }
Example #28
0
 public bool UpdBorrowApply(T_FB_BORROWAPPLYMASTER updataKey)
 {
     bool flag = false;
     if (updataKey != null)
     {
         BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
         flag = bll.UpdBorrowApply(updataKey);
     }
     else
     {
         flag = false;
     }
     return flag;
 }
Example #29
0
        public bool AddBorrowApply(T_FB_BORROWAPPLYMASTER masterKey)
        {
            bool flag = false;
            if (masterKey != null)
            {
                BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
                flag = bll.AddBorrowApply(masterKey);

            }
            else
            {
                flag = false;

            }
            return flag;
        }
Example #30
0
 public T_FB_BORROWAPPLYMASTER GetChildData(string borrowKey)
 {
     T_FB_BORROWAPPLYMASTER borrowEntity;
     if (!string.IsNullOrEmpty(borrowKey))
     {
         BorrowApplyMasterBLL bll = new BorrowApplyMasterBLL();
         borrowEntity = bll.GetChildData(borrowKey);
     }
     else
     {
         borrowEntity = null;
     }
     return borrowEntity != null ? borrowEntity : null;
 }