예제 #1
0
        /// <summary>
        /// 插入银行分类
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool InsertBankInfo(BankInfoModel model)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            if (model == null)
            {
                return(false);
            }
            //登陆日志
            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.CustNo);
                logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
                succ             = BankInfoDBHelper.InsertBankInfo(model);
                if (!succ)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                LogDBHelper.InsertLog(logModel);
                return(succ);
            }
            catch (Exception ex)
            {
                WriteSystemLog(userInfo, ex);
                return(false);
            }
        }
예제 #2
0
        /// <summary>
        /// 修改银行分类
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool UpdateBankInfo(BankInfoModel model)
        {
            if (model == null)
            {
                return(false);
            }
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //登陆日志
            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo(model.CustNo);
                logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                succ             = BankInfoDBHelper.UpdateBankInfo(model);
                if (!succ)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                LogDBHelper.InsertLog(logModel);
                return(succ);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }
예제 #3
0
        /// <summary>
        /// 获取银行信息
        /// </summary>
        /// <returns></returns>
        public static DataTable GetBankInfo(BankInfoModel model, int pageIndex, int pageCount, string OrderBy, ref int totalCount)
        {
            if (model == null)
            {
                return(null);
            }
            try
            {
                return(BankInfoDBHelper.GetBankInfo(model, pageIndex, pageCount, OrderBy, ref totalCount));
            }
            catch (Exception)
            {
                return(null);

                throw;
            }
        }
예제 #4
0
        /// <summary>
        /// 删除银行信息
        /// </summary>
        /// <param name="TypeFlag"></param>
        /// <param name="CompanyCD"></param>
        /// <returns></returns>
        public static bool DeleteBankInfo(string ID, string CompanyCD)
        {
            if (string.IsNullOrEmpty(ID))
            {
                return(false);
            }
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];
            //string CompanyCD = "AAAAAA";
            bool isSucc = BankInfoDBHelper.DeleteBankInfo(ID, CompanyCD);
            //定义变量
            string remark;

            //成功时
            if (isSucc)
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_SUCCESS;
            }
            else
            {
                //设置操作成功标识
                remark = ConstUtil.LOG_PROCESS_FAILED;
            }
            //获取删除的编号列表
            string[] noList = ID.Split(',');
            //遍历所有编号,登陆操作日志
            for (int i = 0; i < noList.Length; i++)
            {
                //获取编号
                string no = noList[i];
                //替换两边的 '
                no = no.Replace("'", string.Empty);

                //操作日志
                LogInfoModel logModel = InitLogInfo("银行档案ID:" + no);
                //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空
                logModel.Element = ConstUtil.LOG_PROCESS_DELETE;
                //设置操作成功标识
                logModel.Remark = remark;

                //登陆日志
                LogDBHelper.InsertLog(logModel);
            }
            return(isSucc);
        }