We would like to see all the Blazor controls support the ability to show the time in the browser's local time as a feature that can be enabled. It should support converted from both UTC and server time.
A question on how to do this has been asked at least twice on the forums:
Some examples of how other's have implemented this as a control can be founde here:
Thanks
What is the plan for docking control or docking manager?
With the default templates for a blazor project there are options for security.
We really need this for the telerik blazor templates or a sample telerik blazor projects using the different types of security.
I'd like to bind a model with a different field name to the TelerikCheckBoxListFilter in the filter menu. Currently, this does not work because the Data has to have a member with the same name as the Field, which is used to update the filter descriptors.
Current Situation:
I have a single API for retrieving lookup values for the filters, that are always called on-demand (when the menu displays). This also supports cascading filter menus. If I want to supply the values back to filter menu I have to make specific code for each field on the model that I want to filter. For example, if I have a FlightNumber column it looks something like this...
public async Task<IEnumerable<object>> FilterValues_FlightNumberAsync() =>
(await Service.GetFilterValuesAsync(nameof(MyModel.FlightNumber), GetLastGridRequest()))
.Select(v => new { FlightNumber = v.Value });
The results of FilterValues_FlightNumberAsync() are then passed in via FilterData below (where @Field would be set to "FlightNumber")
<TelerikCheckBoxListFilter Data="@FilterData" Field="@Field" @bind-FilterDescriptor="Filters" />
This leads to a bunch of tedious code that should not be needed... A specific FilterValues_ function is needed for every column that needs to be filtered
What would be preferable:
Being able to use a single method to retrieve filter values. e.g.
public async Task<IEnumerable<object>> FilterValuesAsync(string memberName) =>
To not break backwards compat, maybe could have an optional DataField parameter...
<TelerikCheckBoxListFilter Data="@FilterData" DataField="Value" Field="@Field" @bind-FilterDescriptor="Filters" />
This would take in LookupValues and and produce FilterDescriptors with MemberName set to Field
Or maybe event better, use generics and allow a callback to extract the filter value...
<TelerikCheckBoxListFilter Data="@FilterData" GetFilterValue="GetFilterValue" Field="@Field" @bind-FilterDescriptor="Filters" />
where GetFilterValue is a Func<TData, string> for example.
===========
ADMIN EDIT
===========
We will most likely keep the Field parameter as is (pointing to the field from the Grid data that will be used to take the distinct options) and expose something like TextField parameter that will point to the field form the TelerikCheckBoxListFilter data containing the distinct options/labels.
Hi,
I have a Blazor grid with multiple selection, and the selection is taken care of using the SelectedItemsChanged event. In that event, I want to check if the selected items satisfy certain criteria, and if not, ignore that particular selection change event.
In the attached sample project, if the EmployeeID is not 6, then the SelectedItems property would get updated. If you see the attached screenshot, that seems to almost work. Employee 6 is not highlighted like the other selected items. But the checkbox is still selected, and that would be confusing since the row is actually not a part of the selected items.
The sample project uses version 2.12, but in another project which runs 2.27, it happens there too.
Please let me know if there's something I missed.
Thanks!
Hi!
I'm trying out Marin Bratnov's code (from a Link - demonstration code). When i try to write a letter in a TelerikComboBox control it is automatically cleared out. I get the same behavior in my own project too. Filtering TelerikComboBox outside the grid works perfecly. Please check te video.
Version 2.26 throws exception in Application Insights. Three exceptions ...
System.Threading.Tasks.TaskCanceledException:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Threading.Tasks.ValueTask`1.get_Result (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.JSInterop.JSRuntime+<InvokeAsync>d__15`1.MoveNext (Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.JSInterop.JSRuntimeExtensions+<InvokeVoidAsync>d__0.MoveNext (Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Telerik.Blazor.Components.Popup.TelerikPopup+<Dispose>d__70.MoveNext (Telerik.Blazor, Version=2.26.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Threading.ExecutionContext.RunInternal (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
System.Threading.Tasks.TaskCanceledException:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Threading.Tasks.ValueTask`1.get_Result (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.JSInterop.JSRuntime+<InvokeAsync>d__15`1.MoveNext (Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.JSInterop.JSRuntimeExtensions+<InvokeVoidAsync>d__0.MoveNext (Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Telerik.Blazor.Components.Common.Filters.FilterMenu.TelerikFilterMenu+<DestroyFilterMenu>d__81.MoveNext (Telerik.Blazor, Version=2.26.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Telerik.Blazor.Components.Common.Filters.FilterMenu.TelerikFilterMenu+<Dispose>d__79.MoveNext (Telerik.Blazor, Version=2.26.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Threading.ExecutionContext.RunInternal (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
System.Threading.Tasks.TaskCanceledException:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Threading.Tasks.ValueTask`1.get_Result (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.JSInterop.JSRuntime+<InvokeAsync>d__15`1.MoveNext (Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.JSInterop.JSRuntimeExtensions+<InvokeVoidAsync>d__0.MoveNext (Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Telerik.Blazor.Components.Common.Animation.AnimationGroupBase+<Dispose>d__55.MoveNext (Telerik.Blazor, Version=2.26.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
at System.Threading.ExecutionContext.RunInternal (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground (Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
We're using a Blazor grid with OData filtering on the server. To construct the url we're using ToODataString on the DataSourceRequest of the grid.
This is working fine as long as we don't add a '&' symbol to the filter. It seems that the ToODataString doesn't replace the & symbol to %26
Here is the reult of our ToODataString, note the red bold &.
$count=true&$filter=(Updated%20ge%202021-08-16T00:00:00.0000000Z%20and%20Updated%20le%202021-09-16T23:59:59.0000000Z%20and%20(contains(Barcode,%27&<-this%20should%20be%20escaped%27)))&$orderby=Cart%20desc&$skip=0&$top=50
When viewing the documentation ( https://docs.telerik.com/blazor-ui ), it would be great to be able to run the code from my browser, just like https://www.w3schools.com/cs/index.php which allows you to run, play and preview the code from the website.
The reason this is so important is that people will be able to quickly test and try out variations of the demo code and do a quick test to see if they got it right. Right now I either have to load the demo solution, make changes, compile the entire solution just to try small changes to the sample code, and then end up corrupting the demo solution.
I think this would be a great feature for all the demos that would support it. And set you apart from your competition.
I have a form with a range of checkboxes. With 2.25, the code worked. With 2.26, I receive an error initCheckbox was undefined.
<TelerikWindow @bind-Visible="ShowAdd" Modal="true" Class="NewRequest">
<WindowTitle>Add Applications</WindowTitle>
<WindowContent>
<div style="position: relative; width: 90vw; max-width: 400px; display: grid; ">
<span style="font-size: medium">@thisEmployee.EmpNickName</span>
<div style="align-content: center; padding: 5px; width: 100%; display:flex; justify-content: center; align-items: center; border: inset">
<div style="padding: 1px "><label for="ckDev">Dev</label><TelerikCheckBox Id="ckDev" @bind-Value="@thisEmployee.Developer" /></div>
<div style="padding: 1px "><label for="ckSales">Sales</label><TelerikCheckBox Id="ckSales" @bind-Value="@thisEmployee.Salesman" /></div>
<div style="padding: 1px "><label for="ckEng">Eng</label><TelerikCheckBox Id="ckEng" @bind-Value="@thisEmployee.Engineer" /></div>
<div style="padding: 1px "><label for="ckPE">PE</label><TelerikCheckBox Id="ckPE" @bind-Value="@thisEmployee.LeadEng" /></div>
<div style="padding: 1px "><label for="ckPM">PM</label><TelerikCheckBox Id="ckPM" @bind-Value="@thisEmployee.PM" /></div>
<div style="padding: 1px "><label for="ckPurch">Purch</label><TelerikCheckBox Id="ckPurch" @bind-Value="@thisEmployee.Purchasing" /></div>
<div style="padding: 1px "><label for="ckSF">Shop</label><TelerikCheckBox Id="ckSF" @bind-Value="@thisEmployee.ShopFore" /></div>
<div style="padding: 1px "><label for="ckFS">Super</label><TelerikCheckBox Id="ckFS" @bind-Value="@thisEmployee.FieldSuper" /></div>
</div><br />
<div style="font-size:smaller">
<TelerikGrid Data="@allApps" Height="50vh" FilterMode="@GridFilterMode.FilterMenu" FilterMenuType="@FilterMenuType.CheckBoxList">
<GridColumns>
<GridColumn Field="MenuCategoryTitle" Title="Category" />
<GridColumn Field="MenuCategoryID" Width="0" />
<GridColumn Width="3em">
<Template>
<div style="float:left; cursor:pointer; color: forestgreen; padding-right: 8px" title="Add Category" @onclick="@((args) => AddCategory((context as Index_Menu).MenuCategoryID))"><ic class="fad fa-plus-square" /></div>
</Template>
</GridColumn>
<GridColumn Field="MenuItemID" Width="0" />
<GridColumn Field="MenuItemTitle" Title="App" />
<GridColumn Width="3em">
<Template>
@if ((context as Index_Menu).MIAssigned == false)
{
<div style="float:left; cursor:pointer; color: forestgreen; padding-right: 8px" title="Add App" @onclick="@((args) => AddItem((context as Index_Menu).MenuItemID))"><ic class="fad fa-plus-square" /></div>
}
else
{
<div style="float:left; cursor:pointer; color: red; padding-right: 8px" title="Delete App" @onclick="@((args) => DeleteApp((context as Index_Menu).MenuItemID))"><ic class="fad fa-trash-alt" /></div>
}
</Template>
</GridColumn>
</GridColumns>
</TelerikGrid>
</div>
<div style="align-content:center; padding:5px; width: 100%; display: flex; justify-content: center; align-items: center; ">
<TelerikButton OnClick="@CancelWindow">CLOSE</TelerikButton>
</div>
</div>
</WindowContent>
</TelerikWindow>
When re-visiting a drop down each selected option is visually indicated, but not to a screen reader user. E.g.:
Figure: Selected options are highlighted but this is not indicated to a screen reader
Blazor SSRS Report Viewer Component
There are third party SSRS reports that we are using in our application. There is no built in SSRS report viewer available for Blazor as it is available for ASP.Net Ajax. If Telerik can provide this important feature it would be a big deal.
There are SSRS Report Viewer's for blazor available from third party like
Please note, we are not the one creating the reports, Reports are created by third party for another application. This web application is just displaying those reports. So, creating new Telerik Reports or migrating to Telerik Reports is not an option.
Hi!
Im using a Grid component InCell Editing the OnDelete, OnUpdate handlers are working fine but OnCreate handler its not working. By the way im using a service to manage the CRUD operations as follows
Page Component
@page "/districts"
@using MVC.Services
@using MVC.Models
@using System.ComponentModel.DataAnnotations
@inject IDistrictService DistrictService
<h3>Districts</h3>
<TelerikGrid Data="@district" Sortable="true" EditMode="@GridEditMode.Incell"
Height="500px"
Pageable="true" PageSize=@PageSize
OnUpdate=@UpdateItem OnDelete=@DeleteItem OnCreate=@CreateItem OnCancel="@OnCancelHandler">
<GridToolBar>
<GridCommandButton Command="Add" Icon="add">Add District</GridCommandButton>
</GridToolBar>
<GridColumns>
<GridColumn Field="@(nameof(District.Id))" Editable="false" />
<GridColumn Field="@(nameof(District.Description))" Title="Description" />
<GridColumn Field="@(nameof(District.EnableApprovalWorkflow))" Title="Enable Approval Workflow" />
<GridCommandColumn>
<GridCommandButton Command="Delete" Icon="delete">Delete</GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
@code {
int PageSize = 15;
IEnumerable<District> district;
protected override async Task OnInitializedAsync()
{
await GetGridData();
}
async Task GetGridData()
{
district = await DistrictService.DistrictList();
}
async Task CreateItem(GridCommandEventArgs args)
{
District item = (District)args.Item;
await DistrictService.DistrictInsert(item);
await GetGridData();
}
void OnCancelHandler(GridCommandEventArgs args)
{
District item = (District)args.Item;
}
async Task DeleteItem(GridCommandEventArgs args)
{
District item = (District)args.Item;
await DistrictService.DistrictDelete(item.Id);
await GetGridData();
}
async Task UpdateItem(GridCommandEventArgs args)
{
District item = (District)args.Item;
await DistrictService.DistrictUpdate(item);
await GetGridData();
}
}
Service Logic
using Dapper;
using Microsoft.Data.SqlClient;
using MVC.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MVC.Services
{
public class DistrictService : IDistrictService
{
private readonly SqlConnectionConfiguration _configuration;
public DistrictService(SqlConnectionConfiguration configuration)
{
_configuration = configuration;
}
public async Task<bool> DistrictInsert(District district)
{
using (var conn = new SqlConnection(_configuration.Value))
{
var parameters = new DynamicParameters();
parameters.Add("Description", district.Description, DbType.String);
parameters.Add("EnableApprovalWorkflow", district.EnableApprovalWorkflow, DbType.Boolean);
await conn.ExecuteAsync("spLookupDistrict_Insert", parameters, commandType: CommandType.StoredProcedure);
}
return true;
}
public async Task<IEnumerable<District>> DistrictList()
{
IEnumerable<District> districts;
using (var conn = new SqlConnection(_configuration.Value))
{
districts = await conn.QueryAsync<District>("spLookupDistrict_List", commandType: CommandType.StoredProcedure);
}
return districts;
}
public async Task<IEnumerable<District>> DistrictSearch(string @Param)
{
var parameters = new DynamicParameters();
parameters.Add("@Param", Param, DbType.String);
IEnumerable<District> districts;
using (var conn = new SqlConnection(_configuration.Value))
{
districts = await conn.QueryAsync<District>("spLookupDistrict_Search", parameters, commandType: CommandType.StoredProcedure);
}
return districts;
}
public async Task<District> District_GetOne(int @Id)
{
District district = new District();
var parameters = new DynamicParameters();
parameters.Add("@Id", Id, DbType.Int32);
using (var conn = new SqlConnection(_configuration.Value))
{
district = await conn.QueryFirstOrDefaultAsync<District>("spLookupDistrict_GetOne", parameters, commandType: CommandType.StoredProcedure);
}
return district;
}
public async Task<bool> DistrictUpdate(District district)
{
using (var conn = new SqlConnection(_configuration.Value))
{
var parameters = new DynamicParameters();
parameters.Add("Id", district.Id, DbType.Int32);
parameters.Add("Description", district.Description, DbType.String);
parameters.Add("EnableApprovalWorkflow", district.EnableApprovalWorkflow, DbType.Boolean);
await conn.ExecuteAsync("spLookupDistrict_Update", parameters, commandType: CommandType.StoredProcedure);
}
return true;
}
public async Task<bool> DistrictDelete(int Id)
{
var parameters = new DynamicParameters();
parameters.Add("@Id", Id, DbType.Int32);
using (var conn = new SqlConnection(_configuration.Value))
{
await conn.ExecuteAsync("spLookupDistrict_Delete", parameters, commandType: CommandType.StoredProcedure);
}
return true;
}
}
}