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(); } } }
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 = "Брокерско друштво"; } }
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); } }
protected void btnUpdateStatus_Click(object sender, EventArgs e) { int id = GXGridView1SelectedValue; if (id > 0) { RadioButtonList rblStatuses = (RadioButtonList)dvChangeStatus.FindControl("rblStatuses"); CashReport cr = CashReport.Get(id); if (rblStatuses.SelectedValue == "ODOBRENO") { cr.CashReportStatusID = CashReportStatuse.GetByCode(CashReportStatuse.ODOBRENO).ID; } else if (rblStatuses.SelectedValue == "VRATENO") { cr.CashReportStatusID = CashReportStatuse.GetByCode(CashReportStatuse.VRATENO).ID; } cr.ApproverUserID = this.PageUser.ID; cr.ApproverDate = DateTime.Now; CashReport.Table.Context.SubmitChanges(); GXGridView1.TotalRecords = ViewCashReport.SelectCountCached(); GXGridView1.DataBind(); mvMain.SetActiveView(viewGrid); } }
protected void SearchControl1_Search(object sender, EventArgs e) { GXGridView1.TotalRecords = ViewCashReport.SelectSearchByFKCountCached("BranchID", this.PageUser.BranchID, SearchControl1.SearchArguments); mvMain.SetActiveView(viewGrid); }
protected void DetailsView1_ItemDeleted(object sender, DetailsViewDeletedEventArgs e) { GXGridView1.TotalRecords = ViewCashReport.SelectByFKCountCached("BranchID", this.PageUser.BranchID); GXGridView1.DataBind(); mvMain.SetActiveView(viewGrid); }
protected void FilterControl1_Filter(object sender, EventArgs e) { GXGridView1.TotalRecords = ViewCashReport.SelectFilterByFKCountCached("BranchID", this.PageUser.BranchID, FilterControl1.FCFilterArgument); }
protected void FilterControl1_Filter(object sender, EventArgs e) { GXGridView1.TotalRecords = ViewCashReport.SelectFilterCountCached(FilterControl1.FCFilterArgument); }
protected void SearchControl1_Search(object sender, EventArgs e) { GXGridView1.TotalRecords = ViewCashReport.SelectSearchCountCached(SearchControl1.SearchArguments); mvMain.SetActiveView(viewGrid); }