示例#1
0
 protected void btnAttachments_Click(object sender, EventArgs e)
 {
     if (GXGridView1.SelectedIndex != -1)
     {
         if (GXGridView1.SelectedDataKey != null)
         {
             int GXgvSelectedValue = Convert.ToInt32(GXGridView1.SelectedValue);
             odsIncomingFactureForAttachments.SelectParameters.Clear();
             odsIncomingFactureForAttachments.SelectParameters.Add("id", GXgvSelectedValue.ToString());
             DetailsViewIncomingFactureForAttachments.DataBind();
         }
         else
         {
             int GXgvSelectedValue = GXGridView1SelectedValue;
             odsIncomingFactureForAttachments.SelectParameters.Clear();
             odsIncomingFactureForAttachments.SelectParameters.Add("id", GXgvSelectedValue.ToString());
             DetailsViewIncomingFactureForAttachments.DataBind();
         }
         mvMain.SetActiveView(viewAttachments);
         btnNew.CssClass         = "novZapis";
         btnEdit.CssClass        = "izmeni";
         btnPreview.CssClass     = "osvezi";
         btnReport.CssClass      = "izvestaj";
         btnSearch.CssClass      = "prebaraj";
         btnAttachments.CssClass = "dokumenti_Active";
         GenerateAllFiles();
     }
 }
示例#2
0
 protected void GXGridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "SingleClick")
     {
         btnEdit.Enabled        = true;
         btnAttachments.Enabled = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         GXGridView1SelectedValue  = Convert.ToInt32(GXGridView1.SelectedValue);
         DetailsViewIncomingFactureForAttachments.DataBind();
     }
     if (e.CommandName == "DoubleClick")
     {
         btnEdit.Enabled        = true;
         btnAttachments.Enabled = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         btnNew.CssClass           = "novZapis";
         btnEdit.CssClass          = "izmeni";
         btnPreview.CssClass       = "osvezi";
         btnReport.CssClass        = "izvestaj";
         btnSearch.CssClass        = "prebaraj";
         btnAttachments.CssClass   = "dokumenti";
         GXGridView1SelectedValue  = Convert.ToInt32(GXGridView1.SelectedValue);
         DetailsViewIncomingFactureForAttachments.DataBind();
         mvMain.SetActiveView(viewEdit);
     }
 }