protected void EgvDeliverItem_RowCommand(object sender, CommandEventArgs e)
 {
     if ((e.CommandName == "Received") && (this.OrderId != "0"))
     {
         int orderId = DataConverter.CLng(this.OrderId);
         DeliverItem.UpdateReceive(orderId);
         Order.Recieve(orderId);
         if (this.ShowOptions == 1)
         {
             BaseUserControl.ResponseRedirect("ShowOrder.aspx?OrderId=" + this.OrderId);
         }
     }
 }
 private void GridViewBind()
 {
     if (!base.IsPostBack)
     {
         if (this.ShowOptions != 0)
         {
             this.EgvBankroll.Columns[0].Visible    = false;
             this.EgvBankroll.Columns[8].Visible    = false;
             this.EgvBankroll.Columns[1].HeaderText = "付款人";
             this.EgvInvoice.Columns[6].Visible     = false;
             this.EgvInvoice.Columns[7].HeaderText  = "开票时间";
             this.EgvDeliverItem.Columns[8].Visible = true;
         }
         if (this.OrderId != "0")
         {
             this.EgvBankroll.DataSource    = BankrollItem.GetList(0, 0, 10, 5, this.OrderId);
             this.EgvInvoice.DataSource     = Invoice.GetList(0, 0, 5, this.OrderId, 0);
             this.EgvDeliverItem.DataSource = DeliverItem.GetList(0, 0, 8, this.OrderId, 0);
             this.EgvTransferLog.DataSource = TransferLog.GetList(0, 0, "10", "OrderID", this.OrderId);
             this.EgvBankroll.DataBind();
             this.EgvInvoice.DataBind();
             this.EgvDeliverItem.DataBind();
             this.EgvTransferLog.DataBind();
             if (string.IsNullOrEmpty(this.ClientName))
             {
                 this.EgvService.DataSource  = null;
                 this.EgvComplain.DataSource = null;
             }
             else
             {
                 this.EgvService.DataSource  = Service.GetListByClientName(0, 0x7fffffff, this.ClientName);
                 this.EgvComplain.DataSource = Complain.GetListByClientName(0, 0x7fffffff, this.ClientName);
             }
             this.EgvService.DataBind();
             this.EgvComplain.DataBind();
             this.FeedbackDataBind();
             this.GdvPaymentLogList.DataSource = PaymentLog.GetListByOrderId(DataConverter.CLng(this.OrderId));
             this.GdvPaymentLogList.DataBind();
         }
     }
 }
示例#3
0
    public void TestDeliver <T> (DeliverItem <T> deliver, AcceptDeliverItem <T> acceptDeliver) where T : ItemGroup
    {
        T group = Inventory.Get <T> ();

        group.Set(5);
        PerformableTasks.Add(deliver);

        // Make sure the task doesn't start if the acceptor's inventory is full
        taskAcceptor.FillGroup <T> ();
        deliver.Start(acceptDeliver);
        if (deliver.Performing)
        {
            Debug.Log("Deliver Item test failed because the task started but acceptor's inventory is full");
            return;
        }

        taskAcceptor.ClearGroup <T> ();
        deliver.onComplete += (PerformerTask task) => {
            taskAcceptor.ClearGroup <T> ();
            deliver.Start(acceptDeliver);

            // Make sure the task doesn't start if the performer's inventory is empty
            if (deliver.Performing)
            {
                Debug.Log("Deliver Item test failed bacause the task started but performer's inventory is empty");
            }
            else
            {
                Debug.Log("Deliver Item test succeeded :)");
            }
        };

        deliver.Start(acceptDeliver);
        if (!deliver.Performing)
        {
            Debug.Log("Deliver Item test failed because the task did not start");
        }
    }
示例#4
0
 public static void OnDeliverItem(Item item, CurrencyType currencyType, int change)
 {
     DeliverItem?.Invoke(item, currencyType, change);
 }