public virtual bool SaveZhongXinAccountLog(ZhongXinAccountLogInfo entity) { string SqlAdd = null; DataTable DtAdd = null; DataRow DrAdd = null; SqlAdd = "SELECT TOP 0 * FROM ZhongXin_Account_Log"; DtAdd = DBHelper.Query(SqlAdd); DrAdd = DtAdd.NewRow(); DrAdd["Account_Log_ID"] = entity.Account_Log_ID; DrAdd["Account_Log_MemberID"] = entity.Account_Log_MemberID; DrAdd["Account_Log_Amount"] = entity.Account_Log_Amount; DrAdd["Account_Log_Remain"] = entity.Account_Log_Remain; DrAdd["Account_Log_Note"] = entity.Account_Log_Note; DrAdd["Account_Log_Addtime"] = entity.Account_Log_Addtime; DrAdd["Account_Log_Site"] = entity.Account_Log_Site; DtAdd.Rows.Add(DrAdd); try { DBHelper.SaveChanges(SqlAdd, DtAdd); return(true); } catch (Exception ex) { throw ex; } finally { DtAdd.Dispose(); } }
/// <summary> /// 会员担保账户操作日志 /// </summary> /// <param name="Member_ID">会员ID</param> /// <param name="Amount">金额</param> /// <param name="Log_note">备注</param> /// <returns></returns> public bool SaveZhongXinAccountLog(int Member_ID, double Amount, string Log_note) { double Account_Log_Remain = GetZhongXinAccountRemainByMemberID(Member_ID); ZhongXinAccountLogInfo accountLog = new ZhongXinAccountLogInfo(); accountLog.Account_Log_ID = 0; accountLog.Account_Log_MemberID = Member_ID; accountLog.Account_Log_Amount = Amount; accountLog.Account_Log_Remain = Account_Log_Remain + Amount; accountLog.Account_Log_Note = Log_note; accountLog.Account_Log_Addtime = DateTime.Now; accountLog.Account_Log_Site = "CN"; if (accountLog.Account_Log_Remain < 0) { return(false); } else { return(MyBLL.SaveZhongXinAccountLog(accountLog)); } }
public virtual bool SaveZhongXinAccountLog(ZhongXinAccountLogInfo entity) { return(MyDAL.SaveZhongXinAccountLog(entity)); }