public ActionResult SaveOrder(Z10Order xorder, bool?IsInDepot, bool?IsPay, long?Bank) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession(); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.DateShip = xorder.DateOrder; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; order.Z10Order.OrderType = (int)EAP.Logic.Z10.OrderTypes.Purchase; order.Z10Order.FeeShip = xorder.FeeShip; order.Z10Order.FeeShould = xorder.FeeShould; order.Save(_tenant.TenantID.Value, db, null); Session.Remove("Z10Order"); bool isin = IsInDepot ?? false; bool ispay = IsPay ?? false; if (isin) { order.StockInDepot(_tenant.TenantID, _user.UserID); } if (ispay) { order.Pay(_tenant.TenantID, _user.UserID, -xorder.FeeShould.Value, Bank); } return(Content("1")); }
public ActionResult SaveOrder(Z10Order xorder, bool?IsInDepot, bool?IsPay, long?Bank) { EAP.Logic.Z10.Order order = EAP.Logic.Z10.Order.CreateWithSession("Z10InventoryInOrder"); order.Z10Order.CustomerID = xorder.CustomerID; order.Z10Order.DateOrder = xorder.DateOrder; order.Z10Order.DateShip = xorder.DateOrder; order.Z10Order.Currency = xorder.Currency; order.Z10Order.Remark = xorder.Remark; order.Z10Order.OrderType = (int)EAP.Logic.Z10.OrderTypes.InventoryIn; order.Z10Order.FeeShip = xorder.FeeShip; order.Z10Order.FeeShould = xorder.FeeShould; order.Save(_tenant.TenantID.Value, db, null); Session.Remove("Z10InventoryInOrder"); order.StockInDepot(_tenant.TenantID, _user.UserID); return(Content("1")); }