public void Update(StockAgentLoan stockAgentLoan)
 {
     var sql = "update stockagentloan set discount = @discount, isformoney = @isformoney, isforticket = @isforticket, updatetime = now() where stockagentid = @stockagentid and stockcode = @stockcode;";
     var parameters = new IDataParameter[]
     {
         new MySqlParameter("@discount", stockAgentLoan.Discount),
         new MySqlParameter("@isformoney", stockAgentLoan.IsForMoney),
         new MySqlParameter("@isforticket", stockAgentLoan.IsForTicket),
         new MySqlParameter("@stockagentid", stockAgentLoan.StockAgentId),
         new MySqlParameter("@stockcode", stockAgentLoan.StockCode),
     };
     this.DbRequest.ExecuteNonQuery(this.ConnectionString, sql, parameters, CommandType.Text);
 }
 public void Create(StockAgentLoan stockAgentLoan)
 {
     var sql = "insert into stockagentloan(stockagentid, stockcode, discount, isformoney, isforticket, createtime, updatetime) values(@stockagentid, @stockcode, @discount, @isformoney, @isforticket, now(), now());";
     var parameters = new IDataParameter[]
     {
         new MySqlParameter("@stockagentid", stockAgentLoan.StockAgentId),
         new MySqlParameter("@stockcode", stockAgentLoan.StockCode),
         new MySqlParameter("@discount", stockAgentLoan.Discount),
         new MySqlParameter("@isformoney", stockAgentLoan.IsForMoney),
         new MySqlParameter("@isforticket", stockAgentLoan.IsForTicket),
     };
     this.DbRequest.ExecuteNonQuery(this.ConnectionString, sql, parameters, CommandType.Text);
 }
示例#3
0
 public void UpdateStockAgentLoan(StockAgentLoan stockAgentLoan)
 {
     _stockAgentLoanRepository.Update(stockAgentLoan);
 }
示例#4
0
 public void CreateStockAgentLoan(StockAgentLoan stockAgentLoan)
 {
     _stockAgentLoanRepository.Create(stockAgentLoan);
 }