void btnNew_Click(object sender, RoutedEventArgs e) { AttendanceMachineSetForm form = new AttendanceMachineSetForm(FormTypes.New, ""); EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); form.MinWidth = 600; form.MinHeight = 300; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
void BtnView_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { T_HR_ATTENDMACHINESET tmp = DtGrid.SelectedItems[0] as T_HR_ATTENDMACHINESET; AttendanceMachineSetForm form = new AttendanceMachineSetForm(FormTypes.Browse, tmp.ATTENDMACHINESETID); form.IsEnabled = false; EntityBrowser browser = new EntityBrowser(form); browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); form.MinWidth = 600; form.MinHeight = 300; browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT")); } }