protected void LinkButton_Invoice_Id_No_Outgoing_Command(object sender, CommandEventArgs e)
        {
            LinkButton  linkb = (LinkButton)sender;
            GridViewRow row   = (GridViewRow)linkb.NamingContainer;

            if (row != null && row.RowIndex != -1 && row.RowIndex != GridView_Outgoing_Invoices.SelectedIndex)
            {
                GridView_Outgoing_Invoices.SelectRow(row.RowIndex);
            }

            ((RadioButton)GridView_Outgoing_Invoices.SelectedRow.Cells[0].FindControl("deals_radio_outg")).Checked = true;

            String forwardString = "/Pages/Popups/Sale/Inv_Details.aspx";

            String invId = ((Label)GridView_Outgoing_Invoices.SelectedRow.Cells[0].FindControl("Label_Inv_Id_Hidden")).Text;
            String rfqId = ((Label)GridView_Outgoing_Invoices.SelectedRow.Cells[0].FindControl("Label_rfq_Id_Hidden")).Text;
            String poId  = BackEndObjects.PurchaseOrder.getPurchaseOrderforRFQIdDB(rfqId).getPo_id();

            forwardString += "?rfId=" + rfqId;
            forwardString += "&context=" + "vendInvoiceGrid";
            forwardString += "&poId=" + poId;
            forwardString += "&invId=" + invId;

            ScriptManager.RegisterStartupScript(this, typeof(string), "DispInvforContactOutgoing", "window.open('" + forwardString + "',null,'resizeable=yes,scrollbars=yes,addressbar=no,toolbar=no,width=1000,Height=900');", true);
        }
        protected void GridView_Outgoing_Invoices_RadioSelect(object sender, EventArgs e)
        {
            RadioButton linkb = (RadioButton)sender;
            GridViewRow row   = (GridViewRow)linkb.NamingContainer;

            if (row != null && row.RowIndex != -1)
            {
                GridView_Outgoing_Invoices.SelectRow(row.RowIndex);
            }
        }
        protected void LinkButton_Pmnt_Det_Outgoing_Command(object sender, CommandEventArgs e)
        {
            LinkButton  linkb = (LinkButton)sender;
            GridViewRow row   = (GridViewRow)linkb.NamingContainer;

            if (row != null && row.RowIndex != -1 && row.RowIndex != GridView_Outgoing_Invoices.SelectedIndex)
            {
                GridView_Outgoing_Invoices.SelectRow(row.RowIndex);
            }

            ((RadioButton)GridView_Outgoing_Invoices.SelectedRow.Cells[0].FindControl("deals_radio_outg")).Checked = true;


            String forwardString = "/Pages/Popups/Purchase/Inv_Payment_Details.aspx";

            forwardString += "?rfId=" + ((Label)GridView_Outgoing_Invoices.SelectedRow.Cells[0].FindControl("Label_rfq_Id_Hidden")).Text;
            forwardString += "&context=" + "vendor";
            forwardString += "&invId=" + ((Label)GridView_Outgoing_Invoices.SelectedRow.Cells[0].FindControl("Label_Inv_Id_Hidden")).Text;
            forwardString += "&invNo=" + ((LinkButton)GridView_Outgoing_Invoices.SelectedRow.Cells[0].FindControl("LinkButton_Invoice_Id_No_Outgoing")).Text;

            ScriptManager.RegisterStartupScript(this, typeof(string), "DispInvPmntContactDealsOutgoing", "window.open('" + forwardString + "',null,'resizeable=yes,scrollbars=yes,addressbar=no,toolbar=no,width=900,Height=700');", true);
        }