Exemplo n.º 1
0
    protected void btnDelete_Click1(object sender, EventArgs e)
    {
        if (GXGridView1.SelectedIndex != -1)
        {
            int bankID = 0;
            if (GXGridView1.SelectedDataKey != null)
            {
                int GXgvSelectedValue = Convert.ToInt32(GXGridView1.SelectedValue);
                bankID = GXgvSelectedValue;
                dvDataSource.SelectParameters.Clear();
                dvDataSource.SelectParameters.Add("id", GXgvSelectedValue.ToString());
                DetailsView1.DataBind();
            }
            else
            {
                int GXgvSelectedValue = GXGridView1SelectedValue;
                bankID = GXgvSelectedValue;
                dvDataSource.SelectParameters.Clear();
                dvDataSource.SelectParameters.Add("id", GXgvSelectedValue.ToString());
                DetailsView1.DataBind();
            }
            Broker.DataAccess.Bank b = Broker.DataAccess.Bank.Get(bankID);
            b.IsActive = false;
            Broker.DataAccess.Bank.Table.Context.SubmitChanges();

            GXGridView1.TotalRecords = ActiveBank.SelectCountCached();
            GXGridView1.DataBind();
            mvMain.SetActiveView(viewGrid);
        }
    }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GXGridView1.TotalRecords = ActiveBank.SelectCountCached();
         mvMain.SetActiveView(viewGrid);
         reportControl.BranchName  = BrokerHouseInformation.GetBrokerHouseNameByCode(BrokerHouseInformation.FIRST_ROW);
         reportControl.CompanyName = "Брокерско друштво";
     }
 }
Exemplo n.º 3
0
    protected void btnDelete_Click1(object sender, EventArgs e)
    {
        Broker.DataAccess.Branch b = Broker.DataAccess.Branch.Get(Convert.ToInt32(DetailsView1.SelectedValue));
        b.IsActive = false;
        Broker.DataAccess.Branch.Table.Context.SubmitChanges();

        GXGridView1.TotalRecords = ActiveBank.SelectCountCached();
        GXGridView1.DataBind();
        mvMain.SetActiveView(viewGrid);
    }
Exemplo n.º 4
0
 protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         e.KeepInEditMode   = true;
         ValidationUtility.ShowValidationErrors(this, e.Exception);
     }
     else
     {
         GXGridView1SelectedValue = Convert.ToInt32(e.NewValues["ID"]);
         GXGridView1.TotalRecords = ActiveBank.SelectCountCached();
         GXGridView1.DataBind();
         mvMain.SetActiveView(viewGrid);
     }
 }
Exemplo n.º 5
0
 protected void DetailsView1_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
 {
     GXGridView1.TotalRecords = ActiveBank.SelectCountCached();
     GXGridView1.DataBind();
     mvMain.SetActiveView(viewGrid);
 }