| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Data;
- using CoreFS.CA06;
- using DbHelp = Core.StlMes.Client.Sale.DbHelp;
- namespace Core.StlMes.Client.Sale.SaleFundMgt.FundDAL.FundCustAccountDAL
- {
- public class FundCustUsedDetailDAL:BaseDAL.BaseDAL
- {
- public FundCustUsedDetailDAL(OpeBase ob)
- : base(ob)
- {
- }
- private const string SQL_INSERT = @" insert into sel_fund_cust_useddetail(trans_seq,
- trans_type,
- balancesubject,
- buyercode,
- money,
- leavemoney,
- otheraccount,
- trans_time,
- trans_person,
- remark,
- updatetime)
- values('{0}','{1}','{2}','{3}',{4},{5},'{6}',sysdate,'{8}','{9}',sysdate)";
- private const string SQL_QUERY = @"select trans_seq,
- trans_type,
- balancesubject,
- buyercode,
- money,
- leavemoney,
- otheraccount,
- trans_time,
- trans_person,
- remark,
- updatetime from sel_fund_cust_useddetail where 1 = 1 {0} ";
- /// <summary>
- /// 获取资金转移表的明细记录
- /// </summary>
- /// <param name="sqlcondtion"></param>
- /// <returns></returns>
- public DataSet GetSelFundUsedDetail(string sqlcondtion)
- {
- string sqlStr = string.Format(SQL_QUERY,sqlcondtion);
- DataSet ds = base.ExecuteReader(sqlStr);
- base.SetDataSetCaption(ref ds, base.GetColumnNameAndCaption());
- return ds;
- }
- /// <summary>
- /// 通过结算单位,客户名称返回其资金转移明细数据
- /// </summary>
- /// <param name="balancesubject"></param>
- /// <param name="buyercode"></param>
- /// <returns></returns>
- public DataSet GetSelFundUsedDetail(string balancesubject,string buyercode)
- {
- string sqlcondtion = base.GetSqlConditon(balancesubject,buyercode,0);
- return GetSelFundUsedDetail(sqlcondtion);
- }
- public void Insert( Model.SEL_FUND_CUST_USEDDETAIL detail,out string errMsg )
- {
- try
- {
- errMsg = "";
- string sqlStr = string.Format(SQL_INSERT, detail.TRANS_SEQ,
- detail.TRANS_TYPE,
- detail.BALANCESUBJECT,
- detail.BUYERCODE,
- detail.MONEY,
- detail.LEAVEMONEY,
- detail.OTHERACCOUNT,
- //Util.DateTimeUtil.GetSystemDate(),
- detail.TRANS_PERSON,
- detail.REMARK
- // Util.DateTimeUtil.GetSystemDate()
- );
- base.ExecuteNoReader(sqlStr, out errMsg);
- }
- catch(Exception ex)
- {
- errMsg = ex.Message;
-
- }
- }
- public void Insert(Model.SEL_FUND_CUST_USEDDETAIL detail, DbHelp.DbTransaction transaction)
- {
- try
- {
- string sqlStr = string.Format(SQL_INSERT, detail.TRANS_SEQ,
- detail.TRANS_TYPE,
- detail.BALANCESUBJECT,
- detail.BUYERCODE,
- detail.MONEY,
- detail.LEAVEMONEY,
- detail.OTHERACCOUNT,
- Util.DateTimeUtil.GetSystemDate(),
- detail.TRANS_PERSON,
- detail.REMARK,
- Util.DateTimeUtil.GetSystemDate()
- );
- base.ExecuteNoReaderForSaleFund(sqlStr, transaction);
- }
- catch(Exception ex)
- {
- transaction.ErrMsg = ex.Message;
- }
-
-
- }
- public string Sql_Insert(Model.SEL_FUND_CUST_USEDDETAIL detail)
- {
-
- string sqlStr = string.Format(SQL_INSERT, detail.TRANS_SEQ,
- detail.TRANS_TYPE,
- detail.BALANCESUBJECT,
- detail.BUYERCODE,
- detail.MONEY,
- detail.LEAVEMONEY,
- detail.OTHERACCOUNT,
- Util.DateTimeUtil.GetSystemDate(),
- detail.TRANS_PERSON,
- detail.REMARK,
- Util.DateTimeUtil.GetSystemDate()
- );
- return sqlStr;
-
- }
- }
- }
|