예제 #1
0
 protected void btnPreviewBankslipItems_Click(object sender, EventArgs e)
 {
     mvBankslipItems.SetActiveView(viewBankslipGrid);
     SearchControl1.SearchArguments       = null;
     GXGridViewBankslipItems.DataSourceID = odsGridViewBankslipItems.ID;
     GXGridViewBankslipItems.DataBind();
 }
예제 #2
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);
    }
예제 #3
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);
    }
예제 #4
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();
     }
 }