private string GetXmlString(string StrSource, T_HR_ATTENDMONTHLYBATCHBALANCE Info) { string ownerCompanyName = string.Empty; string ownerDepartmentName = string.Empty; string ownerPostName = string.Empty; if (Application.Current.Resources["SYS_CompanyInfo"] != null) { SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY ownerCompany = (Application.Current.Resources["SYS_CompanyInfo"] as List <SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY>).Where(s => s.COMPANYID == Info.OWNERCOMPANYID).FirstOrDefault(); SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT ownerDepartment = (Application.Current.Resources["SYS_DepartmentInfo"] as List <SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT>).Where(s => s.DEPARTMENTID == Info.OWNERDEPARTMENTID).FirstOrDefault(); SMT.Saas.Tools.OrganizationWS.T_HR_POST ownerPost = (Application.Current.Resources["SYS_PostInfo"] as List <SMT.Saas.Tools.OrganizationWS.T_HR_POST>).Where(s => s.POSTID == Info.OWNERPOSTID).FirstOrDefault(); if (ownerCompany != null) { ownerCompanyName = ownerCompany.CNAME; } if (ownerDepartment != null) { ownerDepartmentName = ownerDepartment.T_HR_DEPARTMENTDICTIONARY == null ? "" : ownerDepartment.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME; } if (ownerPost != null) { ownerPostName = ownerPost.T_HR_POSTDICTIONARY == null ? "" : ownerPost.T_HR_POSTDICTIONARY.POSTNAME; } } 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; T_SYS_DICTIONARY objecttype = cbxkAssignedObjectType.SelectedItem as T_SYS_DICTIONARY; 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_ATTENDMONTHLYBATCHBALANCE", "CHECKSTATE", "1", checkState)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "BALANCEOBJECTTYPE", Info.BALANCEOBJECTTYPE, objecttype == null ? "" : objecttype.DICTIONARYNAME.ToString())); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "BALANCEOBJECTID", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "BALANCEUNIT", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "CURRENTEMPLOYEENAME", Common.CurrentLoginUserInfo.EmployeeName, Common.CurrentLoginUserInfo.EmployeeName)); string a = mx.TableToXml(Info, entAMBList, StrSource, AutoList); return(a); }
/// <summary> /// 根据相关条件,获取月度考勤批量审核信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void clientAtt_GetAttendMonthlyBatchBalanceByMultSearchCompleted(object sender, GetAttendMonthlyBatchBalanceByMultSearchCompletedEventArgs e) { if (e.Error == null) { AttendMonthlyBatchBalance = e.Result; if (AttendMonthlyBatchBalance == null) { AttendMonthlyBatchBalance = new T_HR_ATTENDMONTHLYBATCHBALANCE(); AttendMonthlyBatchBalance.MONTHLYBATCHID = System.Guid.NewGuid().ToString().ToUpper(); AttendMonthlyBatchBalance.BALANCEYEAR = decimal.Parse(txtBalanceYear.Text); AttendMonthlyBatchBalance.BALANCEMONTH = decimal.Parse(nudBalanceMonth.Value.ToString()); AttendMonthlyBatchBalance.BALANCEDATE = DateTime.Now; AttendMonthlyBatchBalance.BALANCEOBJECTTYPE = BalanceObjectType; AttendMonthlyBatchBalance.BALANCEOBJECTID = BalanceObjectValue; AttendMonthlyBatchBalance.BALANCEOBJECTNAME = string.Empty; AttendMonthlyBatchBalance.CHECKSTATE = Utility.GetCheckState(CheckStates.UnSubmit); AttendMonthlyBatchBalance.EDITSTATE = Convert.ToInt32(EditStates.UnActived).ToString(); AttendMonthlyBatchBalance.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; AttendMonthlyBatchBalance.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; AttendMonthlyBatchBalance.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; AttendMonthlyBatchBalance.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; AttendMonthlyBatchBalance.CREATEPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; AttendMonthlyBatchBalance.CREATEDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; AttendMonthlyBatchBalance.CREATECOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; AttendMonthlyBatchBalance.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; AttendMonthlyBatchBalance.CREATEDATE = DateTime.Now; AttendMonthlyBatchBalance.REMARK = string.Empty; AttendMonthlyBatchBalance.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; AttendMonthlyBatchBalance.UPDATEDATE = DateTime.Now; } this.DataContext = AttendMonthlyBatchBalance; SetBalanceObject(); } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } }
public string AuditMonthlyBatchBalance(T_HR_ATTENDMONTHLYBATCHBALANCE entTemp) { using (AttendMonthlyBatchBalanceBLL bllAttendMonthlyBatchBalance = new AttendMonthlyBatchBalanceBLL()) { return bllAttendMonthlyBatchBalance.AuditMonthlyBatchBalance(entTemp); } }
private string GetXmlString(string StrSource, T_HR_ATTENDMONTHLYBATCHBALANCE Info) { SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY ownerCompany = (Application.Current.Resources["SYS_CompanyInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY>).Where(s => s.COMPANYID == Info.OWNERCOMPANYID).FirstOrDefault(); SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT ownerDepartment = (Application.Current.Resources["SYS_DepartmentInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT>).Where(s => s.DEPARTMENTID == Info.OWNERDEPARTMENTID).FirstOrDefault(); SMT.Saas.Tools.OrganizationWS.T_HR_POST ownerPost = (Application.Current.Resources["SYS_PostInfo"] as List<SMT.Saas.Tools.OrganizationWS.T_HR_POST>).Where(s => s.POSTID == Info.OWNERPOSTID).FirstOrDefault(); string ownerCompanyName = string.Empty; string ownerDepartmentName = string.Empty; string ownerPostName = string.Empty; if (ownerCompany != null) { ownerCompanyName = ownerCompany.CNAME; } if (ownerDepartment != null) { ownerDepartmentName = ownerDepartment.T_HR_DEPARTMENTDICTIONARY == null ? "" : ownerDepartment.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME; } if (ownerPost != null) { ownerPostName = ownerPost.T_HR_POSTDICTIONARY == null ? "" : ownerPost.T_HR_POSTDICTIONARY.POSTNAME; } 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; T_SYS_DICTIONARY objecttype = cbxkAssignedObjectType.SelectedItem as T_SYS_DICTIONARY; 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_ATTENDMONTHLYBATCHBALANCE", "CHECKSTATE", "1", checkState)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "BALANCEOBJECTTYPE", Info.BALANCEOBJECTTYPE, objecttype == null ? "" : objecttype.DICTIONARYNAME.ToString())); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "BALANCEOBJECTID", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "BALANCEUNIT", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName)); AutoList.Add(basedata("T_HR_ATTENDMONTHLYBATCHBALANCE", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName)); string a = mx.TableToXml(Info, entAMBList, StrSource, AutoList); return a; }