private void Save() { //this.DialogResult = true; timer.Start(); object obj = lkSelectObj.DataContext; if (lkSelectObj.TxtLookUp.Text == string.Empty) { timer.Stop(); progressGenerate.Value = progressGenerate.Minimum; Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("RANGEOFCHOICE")); return; } if (obj == null) { return; } //client.CustomGuerdonRecordAccountAsync(0, "7cd6c0a4-9735-476a-9184-103b962d3383", 2010, 3); isSaving = true; RefreshUI(RefreshedTypes.ToolBar); RefreshUI(RefreshedTypes.ProgressBar); if (obj is T_HR_COMPANY) { client.CustomGuerdonRecordAccountAsync(0, ((T_HR_COMPANY)obj).COMPANYID, (int)numYear.Value, (int)numMonth.Value, GetCreateInfor()); } else if (obj is T_HR_DEPARTMENT) { client.CustomGuerdonRecordAccountAsync(1, ((T_HR_DEPARTMENT)obj).DEPARTMENTID, (int)numYear.Value, (int)numMonth.Value, GetCreateInfor()); } else if (obj is T_HR_POST) { client.CustomGuerdonRecordAccountAsync(2, ((T_HR_POST)obj).POSTID, (int)numYear.Value, (int)numMonth.Value, GetCreateInfor()); } else if (obj is T_HR_EMPLOYEE) { client.CustomGuerdonRecordAccountAsync(3, ((T_HR_EMPLOYEE)obj).EMPLOYEEID, (int)numYear.Value, (int)numMonth.Value, GetCreateInfor()); } }