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} "; /// /// 获取资金转移表的明细记录 /// /// /// 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; } /// /// 通过结算单位,客户名称返回其资金转移明细数据 /// /// /// /// 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; } } }