Esempio n. 1
0
        public WCFAddUpdateResult DelInfo(FIN_CashBankAccountParam param)
        {
            WCFAddUpdateResult ret = new WCFAddUpdateResult();
            ExeResult          rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.FIN.FIN_CashBankAccountBLL", "DelInfo", param);
            ret = (rst == null ? new WCFAddUpdateResult() : rst.Result as WCFAddUpdateResult);
            return(ret);
        }
Esempio n. 2
0
        public FIN_CashBankAccountResult GetInfo(FIN_CashBankAccountParam param)
        {
            FIN_CashBankAccountResult ret = new FIN_CashBankAccountResult();
            ExeResult rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.FIN.FIN_CashBankAccountBLL", "GetInfo", param);
            ret = rst == null ? new FIN_CashBankAccountResult() : rst.Result as FIN_CashBankAccountResult;
            return(ret);
        }
Esempio n. 3
0
        public PageList <FIN_CashBankAccountResult> GetPageList(FIN_CashBankAccountParam param)
        {
            ExeResult rst = new ExeResult();

            rst = this.Execute("ZNLCRM.BLL.FIN.FIN_CashBankAccountBLL", "GetPageList", param);
            PageList <FIN_CashBankAccountResult> pageList = new PageList <FIN_CashBankAccountResult>();

            pageList = (rst == null ? new PageList <FIN_CashBankAccountResult>() : rst.Result as PageList <FIN_CashBankAccountResult>);
            return(pageList);
        }
Esempio n. 4
0
        private void BindDataGrid()
        {
            FIN_CashBankAccountParam param = new FIN_CashBankAccountParam();

            param.CBNo   = txtSCBNo.Text;
            param.CBName = txtSCBName.Text;
            PageList <FIN_CashBankAccountResult> rst = this.AsyncExecute <PageList <FIN_CashBankAccountResult>, FIN_CashBankAccountParam>(param, accountLogic.GetPageList, a => {
                if (a.ResultList != null)
                {
                    dgvAccount.DataSource = a.ResultList;
                }
            });
        }
Esempio n. 5
0
        /// <summary>
        /// 查询记录,并返回分页列表
        /// </summary>
        /// <param name="param">查询条件实体</param>
        /// <returns></returns>
        public PageList <FIN_CashBankAccountResult> GetPageList(FIN_CashBankAccountParam param)
        {
            this.CheckSession();
            PageList <FIN_CashBankAccountResult> rst = new PageList <FIN_CashBankAccountResult>();

            WhereClip where = GetWhereClip(param);
            List <Field> lstField = new List <Field>()
            {
                FIN_CashBankAccount._.All
            };

            rst = this.SelectList <FIN_CashBankAccountResult>(param.PageIndex.GetValueOrDefault(1), param.PageSize.GetValueOrDefault(50), lstField, where, FIN_CashBankAccount._.CreatedTime.Desc);
            // rst.ResultList = Sys_EmpDataRightBLL.SetRecIsEdit<FIN_CashBankAccountResult>(rst.ResultList, "BeLongEmpID", "", "OrgID", this.SessionInfo);
            return(rst);
        }
Esempio n. 6
0
 /// <summary>
 /// 获取条件的公共方法
 /// </summary>
 /// <param name="param">条件实体</param>
 /// <returns></returns>
 WhereClip GetWhereClip(FIN_CashBankAccountParam param)
 {
     this.CheckSession();
     WhereClip where = FIN_CashBankAccount._.IsFrozen == 0;
     if (param.CBID != null)
     {
         where = where && FIN_CashBankAccount._.CBID == param.CBID;
     }
     if (param.CBNo != null)
     {
         where = where && FIN_CashBankAccount._.CBNo.Like("%" + param.CBNo + "%");
     }
     if (param.CBName != null)
     {
         where = where && FIN_CashBankAccount._.CBName.Like("%" + param.CBName + "%");
     }
     return(where);
 }
Esempio n. 7
0
        /// <summary>
        /// 获取一条信息记录
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public FIN_CashBankAccountResult GetInfo(FIN_CashBankAccountParam param)
        {
            this.CheckSession();
            FIN_CashBankAccountResult rst = new FIN_CashBankAccountResult();

            #region 判断
            if (param.CBID == null)
            {
                throw new WarnException("请指定账户ID!");
            }
            #endregion
            #region 保存实体
            WhereClip where = GetWhereClip(param);

            rst = this.Select <FIN_CashBankAccountResult>(where);
            //Sys_EmpDataRightBLL.SetRecIsEdit<FIN_CashBankAccountResult>(rst, "BeLongEmpID", "", "OrgID", this.SessionInfo);
            #endregion
            return(rst);
        }
Esempio n. 8
0
        /// <summary>
        /// 删除实体
        /// </summary>
        /// <param name="param">删除条件实体</param>
        /// <returns></returns>
        public WCFAddUpdateResult DelInfo(FIN_CashBankAccountParam param)
        {
            this.CheckSession();
            WCFAddUpdateResult ret = new WCFAddUpdateResult();
            int affect             = 0;

            try
            {
                #region 判断
                if (param.CBID == null)
                {
                    throw new WarnException("请指定要删除的记录!");
                }
                #endregion
                WhereClip where = GetWhereClip(param);
                //FIN_CashBankAccountResult oldInfo = this.GetInfo(param);
                //oldInfo = Sys_EmpDataRightBLL.SetRecIsEdit<FIN_CashBankAccountResult>(oldInfo, "BeLongEmpID", "", "OrgID", this.SessionInfo);
                //if (oldInfo.RecStatu != 2)
                //{
                //    throw new WarnException("您无权删除当前记录!");
                //}
                FIN_CashBankAccountResult info = new FIN_CashBankAccountResult();
                info.IsDeleted      = true;
                info.UpdatedTime    = DateTime.Now;
                info.UpdatedEmpID   = this.SessionInfo.UserID;
                info.UpdatedEmpName = this.SessionInfo.UserName;
                affect = this.Update <FIN_CashBankAccountResult>(info, where);
                #region 设置返回值
                ret.Key = affect;
                #endregion
            }
            catch (WarnException exp)
            {
                throw exp;
            }
            catch (System.Exception exp)
            {
                LogInfoBLL.WriteLog(this.SessionInfo, exp);
                throw exp;
            }
            return(ret);
        }
Esempio n. 9
0
        private void tsbDelAccount_Click(object sender, EventArgs e)
        {
            FIN_CashBankAccountParam param = new FIN_CashBankAccountParam();

            param.CBID = cbid;

            FIN_CashBankAccountResult rst = accountLogic.GetInfo(param);

            if (rst != null)
            {
                if (MessageBox.Show("请确认是否要删除银行账号:【" + rst.CBNo + "】", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    WCFAddUpdateResult result = this.AsyncExecute <WCFAddUpdateResult, FIN_CashBankAccountParam>(param, accountLogic.DelInfo, (a) => { BindDataGrid(); });
                }
            }
            else
            {
                this.ShowMessage("请选择需要删除的银行账号!");
            }
        }