public bool UpdateShipingBillEntry(ShippingBillModel billModel) { string sql = @" update SJShippingBillEntry set Amount= Quantity/@SystemApportionedQuantity*@SystemApportionedAmount where MainId=@Id and GoodsType in(1,3) "; using (var connection = SqlDb.UpdateConnection) { return(connection.Execute(sql, billModel) > 0); } }
public bool UpdateShipingBill2(ShippingBillModel billModel) { string sql = @" update SJShippingBill set TotalAmount=@TotalAmount,TotalQuantity=@TotalQuantity,SystemApportionedQuantity=@SystemApportionedQuantity,SystemApportionedAmount=@SystemApportionedAmount,UnApportionedAmount=@UnApportionedAmount where Id=@Id"; using (var connection = SqlDb.UpdateConnection) { return(connection.Execute(sql, billModel) > 0); } }
public bool UpdateShipingBill(ShippingBillModel billModel) { string sql = @" update SJShippingBill set BillDate=@BillDate ,LogisticsType=@LogisticsType ,LogisticsCompanyName=@LogisticsCompanyName, YunShuFei=@YunShuFei ,YouFei=@YouFei ,GuoLuFei=@GuoLuFei ,ChaiLvFei=@ChaiLvFei ,WeiXiuFei=@WeiXiuFei , Demander=@Demander, OtherCosts=@OtherCosts,TotalAmount=@TotalAmount, Note=@Note,LogisticsBillNo=@LogisticsBillNo,SystemApportionedAmount=@SystemApportionedAmount, GuoNeiDuanFeiYong=@GuoNeiDuanFeiYong,GuoJiDuanFeiYong=@GuoJiDuanFeiYong,YunShuDuanFeiYong=@YunShuDuanFeiYong,Supercargo=@Supercargo,Driver=@Driver where Id=@Id"; using (var connection = SqlDb.UpdateConnection) { return(connection.Execute(sql, billModel) > 0); } }
public void WithParam(ShippingBillModel entry, Action <int, ShippingBillModel> callBack) { ShippingBill = entry; _callBack = callBack; }