protected void GridViewSelectedPurchases_SelectedIndexChanged(object sender, EventArgs e)
 {
     WebUserControlOrderBase1.InitUserControl();
     WebUserControlOrderBase1.OrderType = InvoiceType.Buy;
     WebUserControlOrderBase1.KeyID     = new System.Guid(GridViewSelectedPurchases.SelectedDataKey.Value.ToString());
     WebUserControlOrderBase1.Visible   = true;
 }
        public void SwitchPurchaseType(InvoiceType it)
        {
            switch (it)
            {
            case InvoiceType.Buy:
                LabelInvoiceType.Text = "Buy";
                break;

            case InvoiceType.Sell:
                LabelInvoiceType.Text = "Sell";
                break;
            }
            WebUserControlOrderBase1.SwitchPurchaseType(it);
        }