Пример #1
0
 protected void RadTabStript1_OnTabClick(object sender, RadTabStripEventArgs e)
 {
     if (e.Tab.Text == "Payout History")
     {
         RadGridCreditMemoPayoutHistory.Rebind();
     }
     else if (e.Tab.Text == "Payout")
     {
         RadGridCreditMemoPayout.Rebind();
     }
 }
Пример #2
0
        protected void RadToolBarCreditMemoPayoutHistory_OnButtonClick(object sender, RadToolBarEventArgs e)
        {
            switch (e.Item.Text)
            {
            case "Add Payout":
                if (RadGridCreditMemoPayout.SelectedValue != null)
                {
                    RunClientScript("ShowPayoutHistoryPop('" + RadGridCreditMemoPayout.SelectedValue + "', '0');");
                }
                break;

            case "Payout Reverse":
                if (RadGridCreditMemoPayoutHistory.SelectedValue != null)
                {
                    var creditMemoPayoutHistory = new CCreditMemoPayoutHistory().Get(Convert.ToInt32(RadGridCreditMemoPayoutHistory.SelectedValue));
                    if (creditMemoPayoutHistory.PayoutAmount > 0)
                    {
                        var cNewCreditMemoPayoutHistory = new CCreditMemoPayoutHistory();
                        var newCreditMemoPayoutHistory  = new Erp2016.Lib.CreditMemoPayoutHistory();
                        CGlobal.Copy(creditMemoPayoutHistory, newCreditMemoPayoutHistory);
                        newCreditMemoPayoutHistory.PayoutAmount *= -1;
                        newCreditMemoPayoutHistory.OriginalCreditMemoPayoutHistoryId = creditMemoPayoutHistory.CreditMemoPayoutHistoryId;

                        cNewCreditMemoPayoutHistory.Add(newCreditMemoPayoutHistory);

                        RadGridCreditMemoPayout.Rebind();
                        RadGridCreditMemoPayoutHistory.Rebind();
                    }
                    else
                    {
                        ShowMessage("Negative price can't reverse");
                    }
                }
                break;
            }
        }
Пример #3
0
 protected void RefreshPayoutHistory(object sender, EventArgs e)
 {
     RadGridCreditMemo.Rebind();
     RadGridCreditMemoPayout.Rebind();
     RadGridCreditMemoPayoutHistory.Rebind();
 }