public async Task CategoryMainChanged(Syncfusion.Blazor.DropDowns.ChangeEventArgs <int, CategoryMainAdapterModel> args) { if (args.IsInteracted == true) { if (dataGrid.GridIsExist() == true) { CurrentRecord.CategoryMainId = args.Value; CurrentRecord.CategoryMainName = args.ItemData.Name; if (args.PreviousItemData != null) { if (args.PreviousItemData.Id != args.ItemData.Id) { await GetCategorySubAdapterModels(CurrentRecord.CategoryMainId); CurrentRecord.CategorySubId = 0; CurrentRecord.CategorySubName = ""; } } else { await GetCategorySubAdapterModels(CurrentRecord.CategoryMainId); CurrentRecord.CategorySubId = 0; CurrentRecord.CategorySubName = ""; } } } }
public async Task OnCountyChanged(Syncfusion.Blazor.DropDowns.ChangeEventArgs <byte> args) { byte countyID = args.Value; SelectedCounty = CountyList.FirstOrDefault(x => x.CountyID == countyID); await GetData(SelectedCounty?.CountyName, CriticalDaysCount); }
//public void OnOpenPicker() //{ // ShowAontherRecordPicker = true; //} //public void OnPickerCompletion(DepartmentAdapterModel e) //{ // if (e != null) // { // CurrentRecord.DepartmentId = e.DepartmentId; // CurrentRecord.DepartmentName = e.Name; // } // ShowAontherRecordPicker = false; //} #endregion #region 排序搜尋事件 public void SortChanged(Syncfusion.Blazor.DropDowns.ChangeEventArgs <int, SortCondition> args) { if (dataGrid.GridIsExist() == true) { CurrentSortCondition.Id = args.Value; dataGrid.RefreshGrid(); } }
//public void OnPickerCompletion(DepartmentAdapterModel e) //{ // if (e != null) // { // CurrentRecord.PersonId = e.DepartmentId; // CurrentRecord.DepartmentName = e.Name; // } // ShowAontherRecordPicker = false; //} #endregion #region 排序搜尋事件 public void SortChanged(Syncfusion.Blazor.DropDowns.ChangeEventArgs <int> args) { if (Grid != null) { CurrentSortCondition.Id = args.Value; Grid.Refresh(); } }
public async Task OnCriticalDaysChanged(Syncfusion.Blazor.DropDowns.ChangeEventArgs <int> args) { int criticalDays = args.Value; CriticalDaysCount = criticalDays; await GetCriticalDaysMessage(CriticalDaysCount); await GetData(SelectedCounty?.CountyName, CriticalDaysCount); }
public async Task CategorySubChanged(Syncfusion.Blazor.DropDowns.ChangeEventArgs <int, CategorySubAdapterModel> args) { if (args.IsInteracted == true) { if (dataGrid.GridIsExist() == true) { CurrentRecord.CategorySubId = args.Value; CurrentRecord.CategorySubName = args.ItemData.Name; await Task.Yield(); thisView.NeedRefresh(); } } }
public async Task MailQueueStatusChanged(Syncfusion.Blazor.DropDowns.ChangeEventArgs <int, MailQueueStatusCondition> args) { if (args.IsInteracted == true) { if (dataGrid.GridIsExist() == true) { CurrentMailQueueStatusCondition.Id = args.Value; CurrentMailQueueStatusCondition.Title = MailQueueStatusConditions .FirstOrDefault(x => x.Id == CurrentMailQueueStatusCondition.Id).Title; await Task.Delay(200); dataGrid.RefreshGrid(); } } }
public async Task visibleGrid(Syncfusion.Blazor.DropDowns.ChangeEventArgs <string, Models.FirmaCurierat.Cities> args) { if (isGridVisible == true) { listForGrid = new List <Models.FirmaCurierat.OrdersByCity>(); string ServerName = Environment.MachineName; string database = "CurieratVladProiect"; string ConnectionString = String.Format(@"Server={0}\SQLEXPRESS;Initial Catalog={1}; Integrated Security = SSPI", ServerName, database); string sqlCommand = "select a.nume, a.prenume, b.id_comanda from clienti a " + "inner join comenzi b on a.id_client = b.id_client" + " where a.oras= " + "'" + tara.nume + "'"; listForGrid = await dataHelper.LoadData <FirmaCurierat.Models.FirmaCurierat.OrdersByCity, dynamic>(sqlCommand, new { }, ConnectionString); grid.Refresh(); this.StateHasChanged(); } else { listForGrid = new List <Models.FirmaCurierat.OrdersByCity>(); string ServerName = Environment.MachineName; string database = "CurieratVladProiect"; string ConnectionString = String.Format(@"Server={0}\SQLEXPRESS;Initial Catalog={1}; Integrated Security = SSPI", ServerName, database); string sqlCommand = "select a.nume, a.prenume, b.id_comanda from clienti a " + "inner join comenzi b on a.id_client = b.id_client" + " where a.oras= " + "'" + tara.nume + "'"; listForGrid = await dataHelper.LoadData <FirmaCurierat.Models.FirmaCurierat.OrdersByCity, dynamic>(sqlCommand, new { }, ConnectionString); isGridVisible = true; } }