Пример #1
0
 protected void GXGridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "SingleClick")
     {
         btnFactureItems.Enabled   = true;
         btnAttachments.Enabled    = true;
         btnDiscardFacture.Enabled = true;
         btnChangeStatus.Enabled   = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         GXGridView1SelectedValue  = Convert.ToInt32(GXGridView1.SelectedValue);
         DetailsViewFacturePreview.DataBind();
         GridViewFactureItems.DataBind();
         dvFacturePreviewForAttachments.DataBind();
     }
     if (e.CommandName == "DoubleClick")
     {
         //btnDelete.Enabled = true;
         btnFactureItems.Enabled   = true;
         btnAttachments.Enabled    = true;
         btnDiscardFacture.Enabled = true;
         btnChangeStatus.Enabled   = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         mvMain.SetActiveView(viewFactureItems);
         GXGridView1SelectedValue = Convert.ToInt32(GXGridView1.SelectedValue);
         DetailsViewFacturePreview.DataBind();
         GridViewFactureItems.DataBind();
         dvFacturePreviewForAttachments.DataBind();
         BrokerageInFactureItemsPreview();
     }
 }
Пример #2
0
    protected void btnFactureItems_Click(object sender, EventArgs e)
    {
        if (GXGridView1.SelectedIndex != -1)
        {
            if (GXGridView1.SelectedValue != null)
            {
                int GXgvSelectedValue = Convert.ToInt32(GXGridView1.SelectedValue);
                odsFacturePreview.SelectParameters.Clear();
                odsFacturePreview.SelectParameters.Add("id", GXgvSelectedValue.ToString());
                DetailsViewFacturePreview.DataBind();
                odsFactureItems.SelectParameters.Clear();
                odsFactureItems.SelectParameters.Add("factureID", GXgvSelectedValue.ToString());
                GridViewFactureItems.DataBind();
            }
            else
            {
                int GXgvSelectedValue = GXGridView1SelectedValue;
                odsFacturePreview.SelectParameters.Clear();
                odsFacturePreview.SelectParameters.Add("id", GXgvSelectedValue.ToString());
                DetailsViewFacturePreview.DataBind();
                odsFactureItems.SelectParameters.Clear();
                odsFactureItems.SelectParameters.Add("factureID", GXgvSelectedValue.ToString());
                GridViewFactureItems.DataBind();
            }

            btnNew.CssClass                = "novZapis";
            btnPreview.CssClass            = "osvezi";
            btnReport.CssClass             = "izvestaj";
            btnSearch.CssClass             = "prebaraj";
            btnAttachments.CssClass        = "dokumenti";
            btnFactureItems.CssClass       = "prikaz_Active";
            btnPintFacture.CssClass        = "pecati";
            btnChangeStatus.CssClass       = "promeniStatus";
            btnPaymentsPerFacture.CssClass = "plakanja";
            mvMain.SetActiveView(viewFactureItems);
            BrokerageInFactureItemsPreview();
        }
    }