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 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(CanErpHp.Models.DbAtVdc2.TblHpNhanVien args) { try { var dbAtVdc2CreateTblHpNhanVienResult = await DbAtVdc2.CreateTblHpNhanVien(tblhpnhanvien); DialogService.Close(tblhpnhanvien); } catch (Exception dbAtVdc2CreateTblHpNhanVienException) { NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new TblHpNhanVien!"); } }