Ejemplo n.º 1
0
    protected void btnDiscardCashReport_Click(object sender, EventArgs e)
    {
        int id = GXGridView1SelectedValue;

        if (GXGridView1.SelectedIndex != -1)
        {
            if (GXGridView1.SelectedValue != null)
            {
                id = Convert.ToInt32(GXGridView1.SelectedValue);
            }
            else
            {
                id = GXGridView1SelectedValue;
            }
            CashReport cr = CashReport.Get(id);
            if (cr.CashReportStatuse.Code == CashReportStatuse.ODOBRENO)
            {
                RegisterStartupScript("myAlert", "<script>alert('НЕ МОЖЕ ДА СЕ СТОРНИРА ОДОБРЕН КАСОВ ИЗВЕШТАЈ!')</script>");
                return;
            }
            else
            {
                CashReport.DiscardCashReport(id);
                GXGridView1.TotalRecords = ViewCashReport.SelectByFKCountCached("BranchID", this.PageUser.BranchID);
                GXGridView1.DataBind();
            }
        }
    }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GXGridView1.TotalRecords = ViewCashReport.SelectByFKCountCached("BranchID", this.PageUser.BranchID);
         mvMain.SetActiveView(viewGrid);
         reportControl.BranchName  = BrokerHouseInformation.GetBrokerHouseNameByCode(BrokerHouseInformation.FIRST_ROW);
         reportControl.CompanyName = "Брокерско друштво";
     }
 }
Ejemplo 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 = ViewCashReport.SelectByFKCountCached("BranchID", this.PageUser.BranchID);
         GXGridView1.DataBind();
         mvMain.SetActiveView(viewGrid);
     }
 }
Ejemplo n.º 4
0
 protected void DetailsView1_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
 {
     GXGridView1.TotalRecords = ViewCashReport.SelectByFKCountCached("BranchID", this.PageUser.BranchID);
     GXGridView1.DataBind();
     mvMain.SetActiveView(viewGrid);
 }