示例#1
0
    protected void btnNew_Click(object sender, EventArgs e)
    {
        GXGridViewInsuranceSubTypes.DataBind();
        GXGridViewInsuranceSubTypes.Visible = false;
        mvMain.SetActiveView(viewEdit);
        DetailsView1.ChangeMode(DetailsViewMode.Insert);
        string  code   = CodeGenerator.InsuranceTypeCodeGenerator();
        TextBox tbCode = DetailsView1.FindControl("tbCode") as TextBox;

        tbCode.Text         = code;
        btnNew.CssClass     = "novZapis_Active";
        btnEdit.CssClass    = "izmeni";
        btnDelete.CssClass  = "izbrisi";
        btnPreview.CssClass = "osvezi";
        btnReport.CssClass  = "izvestaj";
        btnSearch.CssClass  = "prebaraj";
    }
示例#2
0
 protected void btnEdit_Click(object sender, EventArgs e)
 {
     if (GXGridView1.SelectedIndex != -1)
     {
         GXGridViewInsuranceSubTypes.DataBind();
         GXGridViewInsuranceSubTypes.Visible = true;
         mvMain.SetActiveView(viewEdit);
         DetailsView1.DataBind();
         DetailsView1.ChangeMode(DetailsViewMode.Edit);
         btnNew.CssClass     = "novZapis";
         btnEdit.CssClass    = "izmeni_Active";
         btnDelete.CssClass  = "izbrisi";
         btnPreview.CssClass = "osvezi";
         btnReport.CssClass  = "izvestaj";
         btnSearch.CssClass  = "prebaraj";
     }
 }
示例#3
0
 protected void GXGridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "SingleClick")
     {
         btnDelete.Enabled = true;
         btnEdit.Enabled   = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         GXGridViewInsuranceSubTypes.DataBind();
     }
     if (e.CommandName == "DoubleClick")
     {
         btnDelete.Enabled = true;
         btnEdit.Enabled   = true;
         int selIndex = Convert.ToInt32(e.CommandArgument);
         GXGridView1.SelectedIndex = selIndex;
         DetailsView1.DataBind();
         DetailsView1.ChangeMode(DetailsViewMode.Edit);
         mvMain.SetActiveView(viewEdit);
         GXGridViewInsuranceSubTypes.DataBind();
         GXGridViewInsuranceSubTypes.Visible = true;
     }
 }