| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 收款(线下转账、现金) |
| | | /// </summary> |
| | | /// <param name="orderId">订单编号</param> |
| | | /// <param name="firmAccountRecord">操作记录</param> |
| | | /// <returns></returns> |
| | | public bool ReceiveMoneyToQueren(int orderId, OA_FirmAccountRecord firmAccountRecord) |
| | | { |
| | | bool isWin = false; |
| | | if (0 >= orderId || !firmAccountRecord.Money.HasValue) |
| | | return false; |
| | | else |
| | | ; |
| | | if ( 0 > firmAccountRecord.Money.Value) |
| | | return false; |
| | | else |
| | | ; |
| | | try |
| | | { |
| | | OA_FirmAccountRecordDAL oA_FirmAccountRecordDAL = new OA_FirmAccountRecordDAL(_dataBase); |
| | | using (TransactionScope tran = new TransactionScope()) |
| | | { |
| | | |
| | | |
| | | //更新订单支付金额 |
| | | isWin = this.UpdateOrderPayedMoney(orderId, -1, firmAccountRecord.Money.Value); |
| | | if (!isWin) |
| | | { |
| | | return isWin; |
| | | } |
| | | else |
| | | ; |
| | | //更新订单状态 |
| | | isWin = this.UpdateOrderPayState(orderId); |
| | | if (!isWin) |
| | | { |
| | | return isWin; |
| | | } |
| | | else |
| | | ; |
| | | tran.Complete(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return isWin; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 收款(外协预付款、客户预付款) |
| | | /// </summary> |
| | |
| | | /// 修改打印状态 |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | public bool Updatejinedanjia(int orderId, decimal SumPrice, decimal UnitPrice) |
| | | public bool Updatejinedanjia(int orderId, decimal SumPrice, decimal UnitPrice,int num) |
| | | { |
| | | try |
| | | { |
| | | string sqlStr = string.Empty; |
| | | sqlStr = "UPDATE EC_OrderBasic SET SumPrice="+ SumPrice + " ,UnitPrice="+ UnitPrice + " WHERE Keyid=@orderId"; |
| | | sqlStr = "UPDATE EC_OrderBasic SET SumPrice="+ SumPrice + " ,UnitPrice="+ UnitPrice + " WHERE Keyid=@orderId;UPDATE [EC_OrderExtend] SET [PrintNum]=" + num + " WHERE Keyid="+ orderId ; |
| | | SqlParameter par = new SqlParameter("@orderId", orderId); |
| | | _dataBase.ExecuteSql(sqlStr, par); |
| | | } |