private async void DGrid_CellEnter(object sender, DataGridViewCellEventArgs e) { try { if (DGrid.RowCount <= 0) { return; } if (DGrid.CurrentRow == null) { return; } var guid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value; var comm = await PrdCommentBussines.GetAsync(guid); if (comm == null) { return; } txtDesc.Text = comm.Comment; } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
private async Task LoadData(string search = "") { try { var list = await PrdCommentBussines.GetAllAsync(PrdGuid, search); ProductBindingSource.DataSource = list.ToList(); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
public static WebPrdComment Get(Guid guid) { try { var prd = PrdCommentBussines.Get(guid); var mapList = Mappings.Default.Map <WebPrdComment>(prd); return(mapList); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); return(null); } }
public static List <WebPrdComment> GetAll(Guid guid) { try { var list = AsyncContext.Run(() => PrdCommentBussines.GetAllAsync(guid)); var mapList = Mappings.Default.Map <List <WebPrdComment> >(list); return(mapList); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); return(null); } }