protected async System.Threading.Tasks.Task Form0Submit(CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien args) { try { if (isEdit) { var dbAtVdc2UpdateTblHpNhanVienResult = await DbAtVdc2.UpdateTblHpNhanVien($"{tblhpnhanvien.NhanVien_ID}", tblhpnhanvien); NotificationService.Notify(NotificationSeverity.Success, $"Success", $"TblHpNhanVien updated!"); } } catch (Exception dbAtVdc2UpdateTblHpNhanVienException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update TblHpNhanVien"); } try { if (!this.isEdit) { var dbAtVdc2CreateTblHpNhanVienResult = await DbAtVdc2.CreateTblHpNhanVien(args); tblhpnhanvien = new CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien(); NotificationService.Notify(NotificationSeverity.Success, $"Success", $"TblHpNhanVien created!"); } } catch (Exception dbAtVdc2CreateTblHpNhanVienException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new TblHpNhanVien!"); } }
protected async System.Threading.Tasks.Task Load() { canEdit = true; var dbAtVdc2GetTblHpNhanVienByNhanVienIdResult = await DbAtVdc2.GetTblHpNhanVienByNhanVienId($"{NhanVien_ID}"); tblhpnhanvien = dbAtVdc2GetTblHpNhanVienByNhanVienIdResult; var dbAtVdc2GetTblHpTinhTpsResult = await DbAtVdc2.GetTblHpTinhTps(); getTblHpTinhTpsResult = dbAtVdc2GetTblHpTinhTpsResult; var dbAtVdc2GetTblHpDanTocsResult = await DbAtVdc2.GetTblHpDanTocs(); getTblHpDanTocsResult = dbAtVdc2GetTblHpDanTocsResult; var dbAtVdc2GetTblHpTonGiaosResult = await DbAtVdc2.GetTblHpTonGiaos(); getTblHpTonGiaosResult = dbAtVdc2GetTblHpTonGiaosResult; var dbAtVdc2GetTblHpQuocTichesResult = await DbAtVdc2.GetTblHpQuocTiches(); getTblHpQuocTichesResult = dbAtVdc2GetTblHpQuocTichesResult; var dbAtVdc2GetTblHpQuansResult = await DbAtVdc2.GetTblHpQuans(); getTblHpQuansResult = dbAtVdc2GetTblHpQuansResult; var dbAtVdc2GetTblGnDepartmentsResult = await DbAtVdc2.GetTblGnDepartments(); getTblGnDepartmentsResult = dbAtVdc2GetTblGnDepartmentsResult; var dbAtVdc2GetTblHpDonViTosResult = await DbAtVdc2.GetTblHpDonViTos(); getTblHpDonViTosResult = dbAtVdc2GetTblHpDonViTosResult; var dbAtVdc2GetTblHpChucVusResult = await DbAtVdc2.GetTblHpChucVus(); getTblHpChucVusResult = dbAtVdc2GetTblHpChucVusResult; var dbAtVdc2GetTblHpTrinhDoVanHoasResult = await DbAtVdc2.GetTblHpTrinhDoVanHoas(); getTblHpTrinhDoVanHoasResult = dbAtVdc2GetTblHpTrinhDoVanHoasResult; var dbAtVdc2GetTblHpNgachesResult = await DbAtVdc2.GetTblHpNgaches(); getTblHpNgachesResult = dbAtVdc2GetTblHpNgachesResult; var dbAtVdc2GetTblHpBacsResult = await DbAtVdc2.GetTblHpBacs(); getTblHpBacsResult = dbAtVdc2GetTblHpBacsResult; tblhpnhanvien = new CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien(); }
protected async System.Threading.Tasks.Task Form0Submit(CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien args) { try { var dbAtVdc2CreateTblHpNhanVienResult = await DbAtVdc2.CreateTblHpNhanVien(tblhpnhanvien); UriHelper.NavigateTo("tbl-hp-nhan-vien-ly-lich"); } catch (Exception dbAtVdc2CreateTblHpNhanVienException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new TblHpNhanVien!"); } }
protected async System.Threading.Tasks.Task Form0Submit(CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien args) { try { var dbAtVdc2UpdateTblHpNhanVienResult = await DbAtVdc2.UpdateTblHpNhanVien($"{NhanVien_ID}", tblhpnhanvien); DialogService.Close(tblhpnhanvien); } catch (Exception dbAtVdc2UpdateTblHpNhanVienException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to update TblHpNhanVien"); } }
protected async System.Threading.Tasks.Task Grid0RowSelect(CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien args) { var result = await DialogService.OpenAsync <EditTblHpNhanVienLyLich>("Edit Tbl Hp Nhan Vien Ly Lich", new Dictionary <string, object>() { { "NhanVien_ID", args.NhanVien_ID } }); await InvokeAsync(() => { StateHasChanged(); }); }
protected async System.Threading.Tasks.Task Grid0RowSelect(CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien args) { isEdit = true; tblhpnhanvien = args; }
protected async System.Threading.Tasks.Task Button0Click(MouseEventArgs args) { tblhpnhanvien = new CanErpHrPr.Models.DbAtVdc2.TblHpNhanVien(); isEdit = false; }