public AttendanceMachineSetForm(FormTypes type, string AttendanceMachineSetID) { InitializeComponent(); FormType = type; InitParas(AttendanceMachineSetID); if (string.IsNullOrEmpty(AttendanceMachineSetID)) { AttendMachineSet = new T_HR_ATTENDMACHINESET(); AttendMachineSet.ATTENDMACHINESETID = Guid.NewGuid().ToString(); } else { client.GetAttendMachineSetByIDAsync(AttendanceMachineSetID); } }
public AttendanceMachineSetForm(FormTypes type, string AttendanceMachineSetID) { InitializeComponent(); FormType = type; InitParas(AttendanceMachineSetID); if (string.IsNullOrEmpty(AttendanceMachineSetID)) { AttendMachineSet = new T_HR_ATTENDMACHINESET(); AttendMachineSet.ATTENDMACHINESETID = Guid.NewGuid().ToString(); } else { client.GetAttendMachineSetByIDAsync(AttendanceMachineSetID); } }
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")); } }
void client_GetAttendMachineSetByIDCompleted(object sender, GetAttendMachineSetByIDCompletedEventArgs e) { if (e.Error == null) { if (e.Result != null) { this.AttendMachineSet = e.Result as T_HR_ATTENDMACHINESET; orgclient.GetCompanyByIdAsync(this.AttendMachineSet.COMPANYID); } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ATTENDMACHINESET")); } }
public void AttendMachineSetUpdate(T_HR_ATTENDMACHINESET entity) { using (AttendMachineSetBLL bll = new AttendMachineSetBLL()) { bll.AttendMachineSetUpdate(entity); } }
void client_GetAttendMachineSetByIDCompleted(object sender, GetAttendMachineSetByIDCompletedEventArgs e) { if (e.Error == null) { if (e.Result != null) { this.AttendMachineSet = e.Result as T_HR_ATTENDMACHINESET; orgclient.GetCompanyByIdAsync(this.AttendMachineSet.COMPANYID); } else Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ATTENDMACHINESET")); } }