public int Insertdb(InvoiceMasterRecord Imr, InvoiceSliveInfo Isi) { try { return _iordertempreturnlistdao.Insertdb(Imr, Isi); } catch (Exception ex) { throw new Exception(" ReturnMasterMgr-->Insertdb-->" + ex.Message, ex); } }
public int Insertdb(InvoiceMasterRecord Imr,InvoiceSliveInfo Isi) {//修改數據 StringBuilder sql = new StringBuilder(); try { sql.AppendFormat(@" UPDATE invoice_master_record SET invoice_status='{0}',free_tax='{1}',sales_amount='{2}',tax_amount='{3}',total_amount='{4}',deduct_bonus='{5}',order_freight_normal='{6}',order_freight_normal_notax='{7}',order_freight_low='{8}',order_freight_low_notax='{9}',status_createdate='{10}' where invoice_id='{11}';", Imr.invoice_status, Imr.free_tax, Imr.sales_amount, Imr.tax_amount, Imr.total_amount, Imr.deduct_bonus, Imr.order_freight_normal, Imr.order_freight_normal_notax, Imr.order_freight_low, Imr.order_freight_low_notax, Imr.status_createdate, Imr.invoice_id); sql.AppendFormat(@" INSERT INTO invoice_slive_info (invoice_slive_info,invoice_id,order_id,item_id,product_name,product_spec_name,sort,single_money,sub_deduct_bonus,buy_num,subtotal,slive_note,slive_createdate) VALUES ();", Isi.buy_num); return _accessMySql.execCommand(sql.ToString()); } catch (Exception ex) { throw new Exception("OrderTempReturnListDao.Insertdb-->" + sql.ToString() + ex.Message, ex); } }