void clientAtt_GetNoAttendCardEmployeesByIDCompleted(object sender, GetNoAttendCardEmployeesByIDCompletedEventArgs e) { if (e.Error == null) { entity = e.Result; SetDateTime(entity.STARTDATE, entity.ENDDATE); if (FormType == FormTypes.Resubmit) { entity.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); } this.DataContext = entity; string[] sArray = entity.EMPLOYEEID.Split(','); ObservableCollection <string> strIds = new ObservableCollection <string>(); foreach (string strId in sArray) { strIds.Add(strId); } clientPer.GetEmployeeByIDsAsync(strIds); lkAssignObject.TxtLookUp.Text = entity.EMPLOYEENAME; lkAssignObject.IsEnabled = false; } else { RefreshUI(RefreshedTypes.HideProgressBar); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } RefreshUI(RefreshedTypes.AuditInfo); SetToolBar(); }
private string GetXmlString(string StrSource, T_HR_NOATTENDCARDEMPLOYEES Info) { //SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY LEFTOFFICECATEGORY = cbxEmployeeType.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY; decimal?stateValue = Convert.ToDecimal("1"); string checkState = string.Empty; SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY checkStateDict = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "CHECKSTATE" && s.DICTIONARYVALUE == stateValue).FirstOrDefault(); checkState = checkStateDict == null ? "" : checkStateDict.DICTIONARYNAME; decimal?postlevelValue = Common.CurrentLoginUserInfo.UserPosts[0].PostLevel; string postLevelName = string.Empty; SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY postLevelDict = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "POSTLEVEL" && s.DICTIONARYVALUE == postlevelValue).FirstOrDefault(); postLevelName = postLevelDict == null ? "" : postLevelDict.DICTIONARYNAME; SMT.SaaS.MobileXml.MobileXml mx = new SMT.SaaS.MobileXml.MobileXml(); List <SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List <SMT.SaaS.MobileXml.AutoDictionary>(); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "CHECKSTATE", "1", checkState)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERPOSTNAME", Common.CurrentLoginUserInfo.UserPosts[0].PostName, Common.CurrentLoginUserInfo.UserPosts[0].PostName)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "POSTLEVEL", postlevelValue.ToString(), postlevelValue.ToString())); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "EMPLOYEENAME", Info.EMPLOYEENAME, Info.EMPLOYEENAME)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName)); string a = mx.TableToXml(Info, null, StrSource, AutoList); return(a); }
/// <summary> /// 表单初始化 /// </summary> private void InitForm() { entity = new T_HR_NOATTENDCARDEMPLOYEES(); entity.NOATTENDCARDEMPLOYEESID = System.Guid.NewGuid().ToString().ToUpper(); //权限控制 entity.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; entity.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; entity.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; entity.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; //2010年2月11日, 11:37:35,目前暂未实现登录部分,人员相关数据为假定值 entity.CREATEDATE = DateTime.Now; entity.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; entity.UPDATEDATE = System.DateTime.Now; entity.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; //页面初始化加载的临时数据 //entity.ASSIGNEDOBJECTTYPE = "0"; entity.EMPLOYEEID = string.Empty; //entity.T_HR_ATTENDANCESOLUTION = new T_HR_ATTENDANCESOLUTION(); entity.STARTDATE = DateTime.Parse(DateTime.Now.AddMonths(1).ToString("yyyy-MM") + "-01"); entity.ENDDATE = DateTime.Parse(DateTime.Now.Year + "-12-31"); //审核 entity.CHECKSTATE = Convert.ToInt32(SMT.SaaS.FrameworkUI.CheckStates.UnSubmit).ToString(); this.DataContext = entity; }
void btnCreate_Click(object sender, RoutedEventArgs e) { if (dgAttSolAsignList.SelectedItems.Count > 0) { // T_HR_LEFTOFFICE temp = DtGrid.SelectedItems[0] as T_HR_LEFTOFFICE; T_HR_NOATTENDCARDEMPLOYEES tempview = dgAttSolAsignList.SelectedItems[0] as T_HR_NOATTENDCARDEMPLOYEES; if (tempview.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString()) { ComfirmWindow delComfirm = new ComfirmWindow(); delComfirm.OnSelectionBoxClosed += (obj, result) => { tempview.CHECKSTATE = "0"; clientAtt.UpdateNoAttendCardEmployeesRdAsync(tempview); }; string Result = ""; delComfirm.SelectionBox(Utility.GetResourceStr("确认"), Utility.GetResourceStr("请确认是否取消免打卡员工设置,确认后即刻生效不需要审核"), ComfirmWindow.titlename, Result); } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("免打卡人员名单未审核通过,不能取消"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } } else { //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }
/// <summary> /// 审核 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnAudit_Click(object sender, RoutedEventArgs e) { string strID = string.Empty; if (dgAttSolAsignList.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "APPOVALBUTTON"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (dgAttSolAsignList.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "APPOVALBUTTON"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } T_HR_NOATTENDCARDEMPLOYEES entAttSolAsign = dgAttSolAsignList.SelectedItems[0] as T_HR_NOATTENDCARDEMPLOYEES; strID = entAttSolAsign.NOATTENDCARDEMPLOYEESID; NoAttendCardEmployeesForm formAttSolAsign = new NoAttendCardEmployeesForm(FormTypes.Audit, strID); EntityBrowser entBrowser = new EntityBrowser(formAttSolAsign); formAttSolAsign.MinWidth = 600; formAttSolAsign.MinHeight = 240; entBrowser.ReloadDataEvent += new EntityBrowser.refreshGridView(entBrowser_ReloadDataEvent); entBrowser.FormType = FormTypes.Audit; entBrowser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
public string UpdateNoAttendCardEmployeesRd(T_HR_NOATTENDCARDEMPLOYEES entOTRd) { using (NoAttendCardEmployeesBLL bllOverTimeRecord = new NoAttendCardEmployeesBLL()) { string str = string.Empty; if (bllOverTimeRecord.Update(entOTRd) == 1) { str = "Sucess"; } else { str = "false"; } return(str); } }
/// <summary> /// 删除指定考勤方案应用记录(物理删除,待定) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnDelete_Click(object sender, RoutedEventArgs e) { string strID = ""; if (dgAttSolAsignList.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (dgAttSolAsignList.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } ObservableCollection <string> strids = new ObservableCollection <string>(); foreach (object ovj in dgAttSolAsignList.SelectedItems) { T_HR_NOATTENDCARDEMPLOYEES ent = ovj as T_HR_NOATTENDCARDEMPLOYEES; if (ent != null) { strID = ent.NOATTENDCARDEMPLOYEESID.ToString(); if (ent.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString()) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("DELETEAUDITERROR"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } strids.Add(strID); } } ComfirmWindow delComfirm = new ComfirmWindow(); delComfirm.OnSelectionBoxClosed += (obj, result) => { clientAtt.DeleteNoAttendCardEmployeesRdAsync(strids); }; string Result = ""; delComfirm.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result); }
public string AddNoAttendCardEmployeesRd(T_HR_NOATTENDCARDEMPLOYEES entOTRd) { using (NoAttendCardEmployeesBLL bllOverTimeRecord = new NoAttendCardEmployeesBLL()) { string str = string.Empty; if (bllOverTimeRecord.GetRecordByID(entOTRd.NOATTENDCARDEMPLOYEESID) != null) { bllOverTimeRecord.Update(entOTRd); str = "Sucess"; } else { if (bllOverTimeRecord.Add(entOTRd)) { str = "Sucess"; } else { str = "false"; } } return(str); } }
public string UpdateNoAttendCardEmployeesRd(T_HR_NOATTENDCARDEMPLOYEES entOTRd) { using (NoAttendCardEmployeesBLL bllOverTimeRecord = new NoAttendCardEmployeesBLL()) { string str = string.Empty; if (bllOverTimeRecord.Update(entOTRd)==1) { str = "Sucess"; } else str = "false"; return str; } }
public string AddNoAttendCardEmployeesRd(T_HR_NOATTENDCARDEMPLOYEES entOTRd) { using (NoAttendCardEmployeesBLL bllOverTimeRecord = new NoAttendCardEmployeesBLL()) { string str = string.Empty; if (bllOverTimeRecord.GetRecordByID(entOTRd.NOATTENDCARDEMPLOYEESID) != null) { bllOverTimeRecord.Update(entOTRd); str = "Sucess"; } else { if (bllOverTimeRecord.Add(entOTRd)) { str = "Sucess"; } else str = "false"; } return str; } }
void clientAtt_GetNoAttendCardEmployeesByIDCompleted(object sender, GetNoAttendCardEmployeesByIDCompletedEventArgs e) { if (e.Error == null) { entity = e.Result; SetDateTime(entity.STARTDATE, entity.ENDDATE); if (FormType == FormTypes.Resubmit) { entity.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); } this.DataContext = entity; string[] sArray = entity.EMPLOYEEID.Split(','); ObservableCollection<string> strIds = new ObservableCollection<string>(); foreach (string strId in sArray) { strIds.Add(strId); } clientPer.GetEmployeeByIDsAsync(strIds); lkAssignObject.TxtLookUp.Text = entity.EMPLOYEENAME; lkAssignObject.IsEnabled = false; } else { RefreshUI(RefreshedTypes.HideProgressBar); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } RefreshUI(RefreshedTypes.AuditInfo); SetToolBar(); }
private string GetXmlString(string StrSource, T_HR_NOATTENDCARDEMPLOYEES Info) { //SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY LEFTOFFICECATEGORY = cbxEmployeeType.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY; decimal? stateValue = Convert.ToDecimal("1"); string checkState = string.Empty; SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY checkStateDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "CHECKSTATE" && s.DICTIONARYVALUE == stateValue).FirstOrDefault(); checkState = checkStateDict == null ? "" : checkStateDict.DICTIONARYNAME; decimal? postlevelValue = Common.CurrentLoginUserInfo.UserPosts[0].PostLevel; string postLevelName = string.Empty; SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY postLevelDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "POSTLEVEL" && s.DICTIONARYVALUE == postlevelValue).FirstOrDefault(); postLevelName = postLevelDict == null ? "" : postLevelDict.DICTIONARYNAME; SMT.SaaS.MobileXml.MobileXml mx = new SMT.SaaS.MobileXml.MobileXml(); List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>(); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "CHECKSTATE", "1", checkState)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERPOSTNAME", Common.CurrentLoginUserInfo.UserPosts[0].PostName, Common.CurrentLoginUserInfo.UserPosts[0].PostName)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "POSTLEVEL", postlevelValue.ToString(), postlevelValue.ToString())); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "EMPLOYEENAME", Info.EMPLOYEENAME, Info.EMPLOYEENAME)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName)); AutoList.Add(basedata("T_HR_NOATTENDCARDEMPLOYEES", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName)); string a = mx.TableToXml(Info, null, StrSource, AutoList); return a; }