Ejemplo n.º 1
0
    protected void GXGridViewBankslipItems_RowUpdated(object sender, GridViewUpdatedEventArgs e)
    {
        int bankslipID = Convert.ToInt32(GXGridView1.SelectedDataKey.Value);

        GXGridViewBankslipItems.TotalRecords = ViewBankslipItem.SelectByFKCountCached("BankslipID", bankslipID);
        e.KeepInEditMode = false;
        GXGridViewBankslipItems.DataBind();
        mvBankslipItems.SetActiveView(viewBankslipGrid);
    }
Ejemplo n.º 2
0
    protected void btnBankslipItems_Click(object sender, EventArgs e)
    {
        int bankslipID = Convert.ToInt32(GXGridView1.SelectedDataKey.Value);

        GXGridViewBankslipItems.TotalRecords = ViewBankslipItem.SelectByFKCountCached("BankslipID", bankslipID);
        GXGridViewBankslipItems.DataBind();
        mvMain.SetActiveView(viewBankslipItems);
        mvBankslipItems.SetActiveView(viewBankslipGrid);
    }
Ejemplo n.º 3
0
 protected void DetailsViewBankslipItem_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         ValidationUtility.ShowValidationErrors(this, e.Exception);
     }
     else
     {
         int bankslipID = GXGridView1SelectedValue;
         GXGridViewBankslipItems.TotalRecords = ViewBankslipItem.SelectByFKCountCached("BankslipID", bankslipID);
         GXGridViewBankslipItems.DataBind();
         mvBankslipItems.SetActiveView(viewBankslipGrid);
         Bankslip bk          = Bankslip.Get(GXGridView1SelectedValue);
         decimal  debtValue   = Convert.ToDecimal(e.Values["DebtValue"]);
         decimal  demandValue = Convert.ToDecimal(e.Values["DemandValue"]);
         bk.DebtValue   -= debtValue;
         bk.DemandValue -= demandValue;
         Bankslip.Table.Context.SubmitChanges();
         dvBankslipForItem.DataBind();
     }
 }