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

            GXGridView1.TotalRecords = ViewBrokerage.SelectCountCached();
            GXGridView1.DataBind();
            mvMain.SetActiveView(viewGrid);
        }
    }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GXGridView1.TotalRecords = ViewBrokerage.SelectCountCached();
         mvMain.SetActiveView(viewGrid);
         reportControl.BranchName  = BrokerHouseInformation.GetBrokerHouseNameByCode(BrokerHouseInformation.FIRST_ROW);
         reportControl.CompanyName = "Брокерско друштво";
     }
 }
Esempio n. 3
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
     {
         GXGridView1.TotalRecords = ViewBrokerage.SelectCountCached();
         GXGridView1.DataBind();
         mvMain.SetActiveView(viewGrid);
     }
 }
Esempio n. 4
0
 protected void DetailsView1_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
 {
     GXGridView1.TotalRecords = ViewBrokerage.SelectCountCached();
     GXGridView1.DataBind();
     mvMain.SetActiveView(viewGrid);
 }
Esempio n. 5
0
 protected void FilterControl1_Filter(object sender, EventArgs e)
 {
     GXGridView1.TotalRecords = ViewBrokerage.SelectFilterCountCached(FilterControl1.FCFilterArgument);
 }
Esempio n. 6
0
 protected void SearchControl1_Search(object sender, EventArgs e)
 {
     GXGridView1.TotalRecords = ViewBrokerage.SelectSearchCountCached(SearchControl1.SearchArguments);
     mvMain.SetActiveView(viewGrid);
 }