예제 #1
0
        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);
        }
예제 #2
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEECANCELLEAVE Info)
        {
            //审核状态
            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 = Convert.ToDecimal(tbEmpLevel.Text.Trim());
            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_EMPLOYEECANCELLEAVE", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTNAME", tbOrgName.Text.Trim(), tbOrgName.Text.Trim()));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "POSTLEVEL", tbEmpLevel.Text.Trim(), postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "ENTITYKEY", Info.CANCELLEAVEID, string.Empty));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return(a);
        }
예제 #3
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEECONTRACT 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;


            //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 == "POSTLEVLE" && s.DICTIONARYVALUE == employeepost.POSTLEVEL).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_EMPLOYEECONTRACT", "CHECKSTATE", "1", checkState));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERCOMPANYID", approvalInfo.OWNERCOMPANYID, StrCompanyName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "EMPLOYEEID", Info.T_HR_EMPLOYEE.EMPLOYEEID, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "POSTLEVEL", EmployeePost.POSTLEVEL.ToString(), EmployeePost.POSTLEVEL.ToString()));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "EMPLOYEECNAME", Info.T_HR_EMPLOYEE.EMPLOYEECNAME, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNER", Info.T_HR_EMPLOYEE.EMPLOYEECNAME, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "CREATEUSERNAME", createUserName, createUserName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "AttachMent", Info.EMPLOYEECONTACTID, Info.EMPLOYEECONTACTID));

            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "NOENDDATE", Info.NOENDDATE, Info.NOENDDATE == "0"?"否":"是"));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return(a);
        }
예제 #4
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEEADDSUMBATCH Info)
        {
            Dictionary <string, string> systype = new Dictionary <string, string>();

            systype.Add("0", "员工加扣款");
            systype.Add("1", "员工代扣款");
            //systype.Add("2", "绩效奖金");
            //systype.Add("3", "其他......");

            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;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY AssignType = cbxkAssignedObjectType.SelectedItem as SMT.Saas.Tools.PermissionWS.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_EMPLOYEEADDSUMBATCH", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTTYPE", Info.BALANCEOBJECTTYPE, AssignType != null ? AssignType.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTID", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCESHORTDATE", Info.BALANCEYEAR + " - " + Info.BALANCEMONTH, Info.BALANCEYEAR + " - " + Info.BALANCEMONTH));//新加字段发薪年月
            foreach (var v in listDetail)
            {
                AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "SYSTEMTYPE", v.SYSTEMTYPE, systype[v.SYSTEMTYPE.ToString()], v.ADDSUMID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "CHECKSTATE", "1", checkState, v.ADDSUMID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "DEALDATE", v.DEALYEAR + " - " + v.DEALMONTH, v.DEALYEAR + " - " + v.DEALMONTH, v.ADDSUMID)); //新加字典加扣款年月
            }
            string a = mx.TableToXml(Info, listDetail, StrSource, AutoList);

            return(a);
        }
예제 #5
0
        private string GetXmlString(string StrSource, T_HR_POSTDICTIONARY Info)
        {
            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;

            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;
            }

            //T_HR_POST fatherPost = lkPost.DataContext as T_HR_POST;
            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_POSTDICTIONARY", "CHECKSTATE", "1", checkState));
            //AutoList.Add(basedata("T_HR_POST", "FATHERPOSTID", Info.FATHERPOSTID, fatherPost == null ? "" : fatherPost.T_HR_POSTDICTIONARY.POSTNAME));
            //AutoList.Add(basedata("T_HR_POST", "POSTNAME", Info.T_HR_POSTDICTIONARY.POSTNAME, Info.T_HR_POSTDICTIONARY.POSTNAME));
            //AutoList.Add(basedata("T_HR_POST", "POSTDICTIONARYID", Info.T_HR_POSTDICTIONARY.POSTDICTIONARYID, Info.T_HR_POSTDICTIONARY.POSTNAME));
            //AutoList.Add(basedata("T_HR_POST", "DEPARTMENTID", Info.T_HR_DEPARTMENT.DEPARTMENTID, lkDepart.TxtLookUp.Text));
            //AutoList.Add(basedata("T_HR_POST", "POSTCODE", txtPosCode.Text, txtPosCode.Text));
            //AutoList.Add(basedata("T_HR_POST", "UNDERNUMBER", txtManageNmber.Value.ToString(), ""));
            //AutoList.Add(basedata("T_HR_POST", "POSTNUMBER", nuPostNumber.Value.ToString(), ""));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_HR_POST", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_POST", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_POST", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return(a);
        }
예제 #6
0
        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);
        }
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESALARYPOSTASIGN 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;

            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_EMPLOYEESALARYPOSTASIGN", "CHECKSTATE", "1", checkState));

            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTID", Info.BALANCEPOSTID, Info.BALANCEPOSTID));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTNAME", Info.BALANCEPOSTNAME, Info.BALANCEPOSTNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "NOTESCONTENT", strRemarkNotes, strRemarkNotes));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));

            ObservableCollection <Object> TrListObj = new ObservableCollection <Object>();

            foreach (var item in listDetails)
            {
                item.EMPLOYEENAME = item.EMPLOYEENAME + "-" + item.EMPLOYEEPOSTNAME + "-" + item.EMPLOYEEDEPARTMENTNAME + "-" + item.EMPLOYEECOMPANYNAME;
                TrListObj.Add(item);
            }

            string a = mx.TableToXml(Info, TrListObj, StrSource, AutoList);

            return(a);
        }
예제 #8
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEEOVERTIMERECORD 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 = Convert.ToDecimal(tbEmpLevel.Text.Trim());
            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;

            decimal?payCatogryValue = Convert.ToDecimal(Info.PAYCATEGORY);

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY PayCatogryDict = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "PAYCATEGORY" && s.DICTIONARYVALUE == payCatogryValue).FirstOrDefault();

            decimal?overTimeValue = Convert.ToDecimal(Info.OVERTIMECATE);

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY overTimeDict = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "OVERTIMECATE" && s.DICTIONARYVALUE == overTimeValue).FirstOrDefault();

            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_EMPLOYEEOVERTIMERECORD", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "CURRENTEMPLOYEENAME", "1", Info.EMPLOYEENAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERPOSTNAME", tbOrgName.Text.Trim(), tbOrgName.Text.Trim()));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "POSTLEVEL", tbEmpLevel.Text.Trim(), postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "EMPLOYEENAME", Info.EMPLOYEENAME, tbEmpName.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "PAYCATEGORY", Info.PAYCATEGORY, PayCatogryDict == null ? "" : PayCatogryDict.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OVERTIMECATE", Info.OVERTIMECATE, overTimeDict == null ? "" : overTimeDict.DICTIONARYNAME));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERCOMPANYID", approvalInfo.OWNERCOMPANYID, StrCompanyName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //    AutoList.Add(basedata("T_HR_LEFTOFFICE", "LEFTOFFICECATEGORY", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYVALUE.ToString() : "0", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYNAME : ""));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return(a);
        }
예제 #9
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEEADDSUM 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;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY SYSTEMTYPE = combProtectType.SelectedItem as SMT.Saas.Tools.PermissionWS.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_EMPLOYEEADDSUM", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "SYSTEMTYPE", SYSTEMTYPE != null ? SYSTEMTYPE.DICTIONARYVALUE.ToString() : "0", SYSTEMTYPE != null ? SYSTEMTYPE.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "EMPLOYEEID", Info.EMPLOYEEID, Info.EMPLOYEEID));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "EMPLOYEENAME", Info.EMPLOYEENAME, Info.EMPLOYEENAME));

            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return(a);
        }
예제 #10
0
        private string GetXmlString(string StrSource, T_HR_DEPARTMENTDICTIONARY Info)
        {
            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;

            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;
            }

            //T_HR_POST fatherPost = lkPost.DataContext as T_HR_POST;
            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_DEPARTMENTDICTIONARY", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_DEPARTMENTDICTIONARY", "CREATEUSERNAME", createUserName, createUserName));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return(a);
        }
예제 #11
0
        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;
        }
예제 #12
0
        private string GetXmlString(string StrSource, T_HR_POSTDICTIONARY Info)
        {

            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;

            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;
            }

            //T_HR_POST fatherPost = lkPost.DataContext as T_HR_POST;
            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_POSTDICTIONARY", "CHECKSTATE", "1", checkState));
            //AutoList.Add(basedata("T_HR_POST", "FATHERPOSTID", Info.FATHERPOSTID, fatherPost == null ? "" : fatherPost.T_HR_POSTDICTIONARY.POSTNAME));
            //AutoList.Add(basedata("T_HR_POST", "POSTNAME", Info.T_HR_POSTDICTIONARY.POSTNAME, Info.T_HR_POSTDICTIONARY.POSTNAME));
            //AutoList.Add(basedata("T_HR_POST", "POSTDICTIONARYID", Info.T_HR_POSTDICTIONARY.POSTDICTIONARYID, Info.T_HR_POSTDICTIONARY.POSTNAME));
            //AutoList.Add(basedata("T_HR_POST", "DEPARTMENTID", Info.T_HR_DEPARTMENT.DEPARTMENTID, lkDepart.TxtLookUp.Text));
            //AutoList.Add(basedata("T_HR_POST", "POSTCODE", txtPosCode.Text, txtPosCode.Text));
            //AutoList.Add(basedata("T_HR_POST", "UNDERNUMBER", txtManageNmber.Value.ToString(), ""));
            //AutoList.Add(basedata("T_HR_POST", "POSTNUMBER", nuPostNumber.Value.ToString(), ""));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            ////AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_HR_POST", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_POST", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_POST", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #13
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEEOVERTIMERECORD 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 = Convert.ToDecimal(tbEmpLevel.Text.Trim());
            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;

            decimal? payCatogryValue = Convert.ToDecimal(Info.PAYCATEGORY);
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY PayCatogryDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "PAYCATEGORY" && s.DICTIONARYVALUE == payCatogryValue).FirstOrDefault();

            decimal? overTimeValue = Convert.ToDecimal(Info.OVERTIMECATE);
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY overTimeDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "OVERTIMECATE" && s.DICTIONARYVALUE == overTimeValue).FirstOrDefault();

            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_EMPLOYEEOVERTIMERECORD", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "CURRENTEMPLOYEENAME", "1", Info.EMPLOYEENAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERPOSTNAME", tbOrgName.Text.Trim(), tbOrgName.Text.Trim()));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "POSTLEVEL", tbEmpLevel.Text.Trim(), postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "EMPLOYEENAME", Info.EMPLOYEENAME, tbEmpName.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "PAYCATEGORY", Info.PAYCATEGORY, PayCatogryDict == null ? "" : PayCatogryDict.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEOVERTIMERECORD", "OVERTIMECATE", Info.OVERTIMECATE, overTimeDict == null ? "" : overTimeDict.DICTIONARYNAME));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERCOMPANYID", approvalInfo.OWNERCOMPANYID, StrCompanyName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //    AutoList.Add(basedata("T_HR_LEFTOFFICE", "LEFTOFFICECATEGORY", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYVALUE.ToString() : "0", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYNAME : ""));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #14
0
        private string GetXmlString(string StrSource, T_HR_COMPANY Info)
        {
            T_SYS_DICTIONARY COMPANYTYPE = cbxCompanyType.SelectedItem as T_SYS_DICTIONARY;
            T_SYS_DICTIONARY COUNTYTYPE = cbxCountry.SelectedItem as T_SYS_DICTIONARY;
            T_SYS_DICTIONARY COMPANYLEVEL = cbxCompanyLevel.SelectedItem as T_SYS_DICTIONARY;
            T_SYS_DICTIONARY CITY = cbxCity.SelectedItem as T_SYS_DICTIONARY;
            T_SYS_DICTIONARY Province = cbxProvince.SelectedItem as 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;

            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_COMPANY", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_COMPANY", "COMPANYTYPE", COMPANYTYPE != null ? COMPANYTYPE.DICTIONARYVALUE.ToString() : "0", COMPANYTYPE != null ? COMPANYTYPE.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_COMPANY", "COUNTYTYPE", COUNTYTYPE != null ? COUNTYTYPE.DICTIONARYVALUE.ToString() : "0", COUNTYTYPE != null ? COUNTYTYPE.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_COMPANY", "COMPANYLEVEL", COMPANYLEVEL != null ? COMPANYLEVEL.DICTIONARYVALUE.ToString() : "0", COMPANYLEVEL != null ? COMPANYLEVEL.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_COMPANY", "CITY", CITY != null ? CITY.DICTIONARYVALUE.ToString() : "0", CITY != null ? CITY.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_COMPANY", "OWNERPROVINCE", Province != null ? Province.DICTIONARYVALUE.ToString() : "0", Province != null ? Province.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_COMPANY", "SORTINDEX", txtSortNumber.Value.ToString(), ""));
            if (Info.FATHERTYPE == "0")
            {
                AutoList.Add(basedata("T_HR_COMPANY", "SUPERIORORG", Info.FATHERID, lkParentCompany.TxtLookUp.Text));
            }
            else
            {
                AutoList.Add(basedata("T_HR_COMPANY", "SUPERIORDEPARTMENT", Info.FATHERID, lkParentDepartment.TxtLookUp.Text));
            }
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));

            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #15
0
        private string GetXmlString(string StrSorce, T_FB_REPAYAPPLYMASTER Info)
        {
            string goouttomeet = string.Empty;
            string privateaffair = string.Empty;
            string companycar = string.Empty;
            string isagent = string.Empty;

            SMT.SaaS.MobileXml.MobileXml mx = new MobileXml();
            SMT.SaaS.MobileXml.AutoDictionary ad = new AutoDictionary();
            List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>();

            string StrPayType = "";
            string StrEditState = "";
            switch (Info.REPAYTYPE.ToString())
            {
                case "1":
                    StrPayType = "现金还普通借款";
                    break;
                case "2":
                    StrPayType = "现金还备用金借款";
                    break;
                case "3":
                    StrPayType = "现金还专项借款";
                    break;
            }
            switch (Info.EDITSTATES.ToString())
            {
                case "0":
                    StrEditState = "删除状态";
                    break;
                case "1":
                    StrEditState = "已生效";
                    break;
                case "2":
                    StrEditState = "未生效";
                    break;
                case "3":
                    StrEditState = "撤消中";
                    break;
                case "4":
                    StrEditState = "已撤消";
                    break;
            }
            AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "POSTLEVEL", txPostLevel, null));//POSTLEVEL
            AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "REPAYTYPE", Info.REPAYTYPE.ToString(), StrPayType));//相关单据类型
            AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "EDITSTATES", Info.EDITSTATES.ToString(), StrEditState));//编辑状态
            if (Info.OWNERID != null && !string.IsNullOrEmpty(strOwnerName))
            {
                AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "OWNERID", Info.OWNERID, strOwnerName + "-" + strOwnerPostName + "-" + strOwnerDepartmentName + "-" + strOwnerCompanyName));
            }
            if (Info.OWNERCOMPANYID != null && !string.IsNullOrEmpty(strOwnerCompanyName))
            {
                AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "OWNERCOMPANYID", Info.OWNERCOMPANYID, strOwnerCompanyName));
            }
            if (Info.OWNERDEPARTMENTID != null && !string.IsNullOrEmpty(strOwnerDepartmentName))
            {
                AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, strOwnerDepartmentName));
            }
            if (Info.OWNERPOSTID != null && !string.IsNullOrEmpty(strOwnerPostName))
            {
                AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "OWNERPOSTID", Info.OWNERPOSTID, strOwnerPostName));
            }
            //AutoList.Add(basedata("T_FB_REPAYAPPLYMASTER", "BORROWAPPLYMASTERID", Info.T_FB_BORROWAPPLYMASTER.BORROWAPPLYMASTERCODE, Info.T_FB_BORROWAPPLYMASTER.BORROWAPPLYMASTERCODE));

            ObservableCollection<T_FB_REPAYAPPLYDETAIL> objR;
            if (repayDetailData != null && repayDetailData.Count > 0)
            {
                objR = repayDetailData;
            }
            else
            {
                objR = repayDetailData;
            }
            foreach (T_FB_REPAYAPPLYDETAIL objDetail in objR)
            {
                if (objDetail.T_FB_SUBJECT != null)
                {
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "SUBJECTID", objDetail.T_FB_SUBJECT.SUBJECTID, objDetail.T_FB_SUBJECT.SUBJECTID, objDetail.REPAYAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "SUBJECTCODE", objDetail.T_FB_SUBJECT.SUBJECTCODE, objDetail.T_FB_SUBJECT.SUBJECTCODE, objDetail.REPAYAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "SUBJECTNAME", objDetail.T_FB_SUBJECT.SUBJECTNAME, objDetail.T_FB_SUBJECT.SUBJECTNAME, objDetail.REPAYAPPLYDETAILID));
                }
                if (objDetail.T_FB_BORROWAPPLYDETAIL != null)
                {
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "BORROWAPPLYDETAILID", objDetail.T_FB_BORROWAPPLYDETAIL.BORROWAPPLYDETAILID, objDetail.T_FB_BORROWAPPLYDETAIL.BORROWAPPLYDETAILID, objDetail.REPAYAPPLYDETAILID));
                    //AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "UNREPAYMONEY", objDetail.T_FB_BORROWAPPLYDETAIL.UNREPAYMONEY.ToString(), objDetail.T_FB_BORROWAPPLYDETAIL.UNREPAYMONEY.ToString(), objDetail.REPAYAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "UNREPAYMONEY", (objDetail.T_FB_BORROWAPPLYDETAIL.UNREPAYMONEY - objDetail.REPAYMONEY).ToString(), (objDetail.T_FB_BORROWAPPLYDETAIL.UNREPAYMONEY - objDetail.REPAYMONEY).ToString(), objDetail.REPAYAPPLYDETAILID));
                }
                if (objDetail.T_FB_REPAYAPPLYMASTER != null)
                {
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "REPAYAPPLYMASTERID", objDetail.T_FB_REPAYAPPLYMASTER.REPAYAPPLYMASTERID, objDetail.T_FB_REPAYAPPLYMASTER.REPAYAPPLYMASTERID, objDetail.REPAYAPPLYDETAILID));
                }
                if (objDetail.CHARGETYPE != null)
                {
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "CHARGETYPE", objDetail.CHARGETYPE.ToString(), objDetail.CHARGETYPE.ToString() == "1" ? "个人预算费用" : "公共预算费用", objDetail.REPAYAPPLYDETAILID));
                }
                switch (objDetail.REPAYTYPE.ToString())
                {
                    case "1":
                        StrPayType = "普通借款";
                        break;
                    case "2":
                        StrPayType = "备用金借款";
                        break;
                    case "3":
                        StrPayType = "专项借款";
                        break;
                }
                if (objDetail.REPAYTYPE != null)
                {
                    AutoList.Add(basedataForChild("T_FB_REPAYAPPLYDETAIL", "REPAYTYPE", objDetail.REPAYTYPE.ToString(), StrPayType, objDetail.REPAYAPPLYDETAILID));
                }

            }
            string a = mx.TableToXml(Info, objR, StrSorce, AutoList);
            return a;

        }
예제 #16
0
        private string GetXmlString(string StrSource, T_HR_DEPARTMENT Info)
        {
            T_HR_POST headPost = (lkHead.DataContext as T_HR_POST);
            SMT.SaaS.MobileXml.MobileXml mx = new SMT.SaaS.MobileXml.MobileXml();
            List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>();
            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? compayTypeValue = Convert.ToDecimal((acbDepName.SelectedItem as T_HR_DEPARTMENTDICTIONARY).DEPARTMENTTYPE);
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY companyTypedict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "COMPANYTYPE" && s.DICTIONARYVALUE == compayTypeValue).FirstOrDefault();

            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;
            }
            string dpn = companyTypedict == null ? "" : companyTypedict.DICTIONARYNAME;
            string departFullName = Info.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME + "(" + dpn + ")";
            AutoList.Add(basedata("T_HR_DEPARTMENT", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "DEPARTMENTDICTIONARYID", Info.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTDICTIONARYID, Info.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "COMPANYID", Info.T_HR_COMPANY.COMPANYID, Info.T_HR_COMPANY.CNAME));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "DEPARTMENTBOSSHEAD", Info.DEPARTMENTBOSSHEAD, string.IsNullOrEmpty(lkHead.TxtLookUp.Text) ? "" : lkHead.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "FATHERID", Info.FATHERID, lkFather.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "DEPARTMENTCODE", txtDepartmentCode.Text, txtDepartmentCode.Text));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "DEPARTMENTNAME", Info.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME, Info.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "DEPARTMENTTYPE", companyTypedict == null ? "" : companyTypedict.DICTIONARYVALUE.ToString(), companyTypedict == null ? "" : companyTypedict.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "DEPARTMENT", Info.DEPARTMENTID, departFullName));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "SORTINDEX", txtSortNumber.Value.ToString(), ""));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            AutoList.Add(basedata("T_HR_DEPARTMENT", "EDITSTATE", Info.EDITSTATE, this.tbEdit.Text));//生效状态
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #17
0
        private string GetXmlString(string StrSource, T_HR_LEFTOFFICECONFIRM Info)
        {
            List<object> ObjectList = new List<object>();
            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;


            //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 == "POSTLEVLE" && s.DICTIONARYVALUE == employeepost.POSTLEVEL).FirstOrDefault();
            //postLevelName = postLevelDict == null ? "" : postLevelDict.DICTIONARYNAME;

           // SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY LEFTOFFICECATEGORY = cbxEmployeeType.SelectedItem as SMT.Saas.Tools.PermissionWS.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_LEFTOFFICECONFIRM", "CHECKSTATE", "1", checkState));
            if (EmployeePost != null)
            {
                AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "POSTLEVEL", EmployeePost.POSTLEVEL.ToString(), EmployeePost.POSTLEVEL.ToString()));
            }
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERCOMPANYID", approvalInfo.OWNERCOMPANYID, StrCompanyName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "LEFTOFFICECATEGORY", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYVALUE.ToString() : "0", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "LEFTOFFICECATEGORY", "1", "辞职"));
            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "EMPLOYEEID", Info.EMPLOYEEID, Info.EMPLOYEECNAME));
            //AutoList.Add(basedata("T_HR_EMPLOYEECHECK", "POSTLEVEL", Info.T_HR_LEFTOFFICE.T_HR_EMPLOYEEPOST.POSTLEVEL employeepost.POSTLEVEL.ToString(), employeepost.POSTLEVEL.ToString()));
            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "EMPLOYEECNAME", Info.EMPLOYEECNAME, Info.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "OWNER", Info.EMPLOYEECNAME, Info.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "CREATEUSERNAME", createUserName, createUserName));

            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_LEFTOFFICECONFIRM", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            List<T_FB_PERSONACCOUNT> objPe=new List<T_FB_PERSONACCOUNT>();
            if (perCount != null && perCount.Count > 0)
            {
                objPe = perCount.ToList();
            }
            foreach (var item in objPe)
            {
                AutoList.Add(basedataForChild("T_FB_PERSONACCOUNT", "SPECIALBORROWMONEY", item.SPECIALBORROWMONEY.ToString(), item.SPECIALBORROWMONEY.ToString(), item.PERSONACCOUNTID));
                AutoList.Add(basedataForChild("T_FB_PERSONACCOUNT", "SIMPLEBORROWMONEY", item.SIMPLEBORROWMONEY.ToString(), item.SIMPLEBORROWMONEY.ToString(), item.PERSONACCOUNTID));
                AutoList.Add(basedataForChild("T_FB_PERSONACCOUNT", "BACKUPBORROWMONEY", item.BACKUPBORROWMONEY.ToString(), item.BACKUPBORROWMONEY.ToString(), item.PERSONACCOUNTID));
                ObjectList.Add(item);
            }
            string a = mx.TableToXml(Info, ObjectList, StrSource, AutoList);

            return a;
        }
예제 #18
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEECANCELLEAVE Info)
        {
            //审核状态
            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 = Convert.ToDecimal(tbEmpLevel.Text.Trim());
            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_EMPLOYEECANCELLEAVE", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTNAME", tbOrgName.Text.Trim(), tbOrgName.Text.Trim()));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "POSTLEVEL", tbEmpLevel.Text.Trim(), postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));
            AutoList.Add(basedata("T_HR_EMPLOYEECANCELLEAVE", "ENTITYKEY", Info.CANCELLEAVEID, string.Empty));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #19
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEEADDSUM 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;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY SYSTEMTYPE = combProtectType.SelectedItem as SMT.Saas.Tools.PermissionWS.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_EMPLOYEEADDSUM", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "SYSTEMTYPE", SYSTEMTYPE != null ? SYSTEMTYPE.DICTIONARYVALUE.ToString() : "0", SYSTEMTYPE != null ? SYSTEMTYPE.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "EMPLOYEEID", Info.EMPLOYEEID, Info.EMPLOYEEID));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "EMPLOYEENAME", Info.EMPLOYEENAME, Info.EMPLOYEENAME));

            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUM", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #20
0
        private string GetXmlString(string StrSource, T_HR_SALARYARCHIVE 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;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY oldPostLevelDict = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "POSTLEVEL" && s.DICTIONARYVALUE == Info.OLDPOSTLEVEL).FirstOrDefault();

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY postLevelDict = cbxPostLevel.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY salaryLevelDict = cbxSalaryLevel.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY oldSalaryLevelDict = cbxOldSalaryLevel.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY;
            SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY payCompany = (lkSalaryCompany.DataContext as SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY);


            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_SALARYARCHIVE", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "POSTLEVEL", postLevelDict == null ? "" : postLevelDict.DICTIONARYVALUE.ToString(), postLevelDict == null ? "" : postLevelDict.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "SALARYLEVEL", salaryLevelDict == null ? "" : salaryLevelDict.DICTIONARYVALUE.ToString(), salaryLevelDict == null ? "" : salaryLevelDict.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "OLDSALARYLEVEL", oldSalaryLevelDict == null ? "" : oldSalaryLevelDict.DICTIONARYVALUE.ToString(), oldSalaryLevelDict == null ? "" : oldSalaryLevelDict.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "OLDPOSTLEVEL", oldPostLevelDict == null ? "" : oldPostLevelDict.DICTIONARYVALUE.ToString(), oldPostLevelDict == null ? "" : oldPostLevelDict.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "SALARYSOLUTIONID", Info.SALARYSOLUTIONID, Info.SALARYSOLUTIONNAME));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "PAYCOMPANY", Info.PAYCOMPANY, payCompany == null ? "" : payCompany.CNAME));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "SALARYSTANDARDID", Info.T_HR_SALARYSTANDARD.SALARYSTANDARDID, txtSalaryStandard.Text));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "SALARYSOLUTIONNAME", Info.SALARYSOLUTIONID, Info.SALARYSOLUTIONNAME));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "SALARYSTANDARDNAME", Info.T_HR_SALARYSTANDARD.SALARYSTANDARDID, txtSalaryStandard.Text));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "AVAILABLEDATE", Info.OTHERSUBJOIN.ToString() + Utility.GetResourceStr("YEAR") + Info.OTHERADDDEDUCT.ToString() + Utility.GetResourceStr("MONTH"), ""));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "lkAttendanceCompany", lkAttendanceCompany.TxtLookUp.Text, lkAttendanceCompany.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "lkBalancePost", lkBalancePost.TxtLookUp.Text, lkBalancePost.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "FUNDS", txtSum.Text, txtSum.Text));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "FUNDSREMARK", txtSumRemark.Text, txtSumRemark.Text));
            AutoList.Add(basedata("T_HR_SALARYARCHIVE", "EMPLOYEENAME", Info.EMPLOYEENAME, Info.EMPLOYEENAME));//lkEmployee.TxtLookUp.Text
            //需要转换的薪资项目
            List<V_SALARYARCHIVEITEM> listView = new List<V_SALARYARCHIVEITEM>();
            foreach (var v in archiveItemsList)
            {
                if (!string.IsNullOrEmpty(v.SUM) && v.SUM != "0")
                {
                    string desString = SMT.SaaS.FrameworkUI.Common.Utility.AESDecrypt(v.SUM);
                    if (!string.IsNullOrEmpty(desString) && desString != "0")
                    {
                        try
                        {
                            if (double.Parse(desString) > 0)
                            {
                                AutoList.Add(basedataForChild("V_SALARYARCHIVEITEM", "REMARK", v.REMARK, "", v.SALARYARCHIVEITEM));
                                listView.Add(v);
                            }
                        }
                        catch
                        {

                        }
                    }
                    
                }
            }
            string a = mx.TableToXml(Info, listView, StrSource, AutoList);

            return a;
        }
예제 #21
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEEADDSUMBATCH Info)
        {
            Dictionary<string, string> systype = new Dictionary<string, string>();
            systype.Add("0", "员工加扣款");
            systype.Add("1", "员工代扣款");
            //systype.Add("2", "绩效奖金");
            //systype.Add("3", "其他......");

            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;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY AssignType = cbxkAssignedObjectType.SelectedItem as SMT.Saas.Tools.PermissionWS.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_EMPLOYEEADDSUMBATCH", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTTYPE", Info.BALANCEOBJECTTYPE, AssignType != null ? AssignType.DICTIONARYNAME : ""));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCEOBJECTID", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            AutoList.Add(basedata("T_HR_EMPLOYEEADDSUMBATCH", "BALANCESHORTDATE", Info.BALANCEYEAR + " - " + Info.BALANCEMONTH, Info.BALANCEYEAR + " - " + Info.BALANCEMONTH));//新加字段发薪年月
            foreach (var v in listDetail)
            {
                AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "SYSTEMTYPE", v.SYSTEMTYPE, systype[v.SYSTEMTYPE.ToString()], v.ADDSUMID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "CHECKSTATE", "1", checkState, v.ADDSUMID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEEADDSUM", "DEALDATE",  v.DEALYEAR + " - " + v.DEALMONTH, v.DEALYEAR + " - " + v.DEALMONTH, v.ADDSUMID));//新加字典加扣款年月
            }
            string a = mx.TableToXml(Info, listDetail, StrSource, AutoList);

            return a;
        }
예제 #22
0
        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;
        }
예제 #23
0
        private string GetXmlString(string StrSource, T_HR_SALARYRECORDBATCH Info)
        {

            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;
            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_SALARYRECORDBATCH", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_SALARYRECORDBATCH", "PAYTOTALMONEY", tbTotalMoney.Text, ""));
            AutoList.Add(basedata("T_HR_SALARYRECORDBATCH", "PAYAVERAGE", tbAvgMoney.Text, ""));
            AutoList.Add(basedata("T_HR_SALARYRECORDBATCH", "BALANCEOBJECTID", Info.BALANCEOBJECTID, lkAssignObject.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_SALARYRECORDBATCH", "PAYDATE", Info.BALANCEYEAR + Utility.GetResourceStr("YEAR") + Info.BALANCEMONTH + Utility.GetResourceStr("MONTH"), ""));
            AutoList.Add(basedata("T_HR_SALARYRECORDBATCH", "CURRENTEMPLOYEENAME", Common.CurrentLoginUserInfo.EmployeeName, Common.CurrentLoginUserInfo.EmployeeName));
            if (Info.T_HR_EMPLOYEESALARYRECORD != null)
            {
                Info.T_HR_EMPLOYEESALARYRECORD.Clear();
            }

            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #24
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESIGNINRECORD Info)
        {
            //异常类型
            var abnormcategoryDicts = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "ABNORMCATEGORY");
            Dictionary<string, string> abnormcategory = new Dictionary<string, string>();
            foreach (var abnorm in abnormcategoryDicts)
            {
                abnormcategory.Add(abnorm.DICTIONARYVALUE.ToString(), abnorm.DICTIONARYNAME);
            }

            //异常原因
            var reasoncategoryDicts = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "REASONCATEGORY");
            Dictionary<string, string> reson = new Dictionary<string, string>();
            foreach (var reason in reasoncategoryDicts)
            {
                reson.Add(reason.DICTIONARYVALUE.ToString(), reason.DICTIONARYNAME);
            }

            //异常时间段
            var dperiodDicts = (Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "ATTENDPERIOD");
            Dictionary<string, string> dperiod = new Dictionary<string, string>();
            foreach (var item in dperiodDicts)
            {
                dperiod.Add(item.DICTIONARYVALUE.ToString(), item.DICTIONARYNAME);
            }

            //审核状态
            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 = Convert.ToDecimal(tbPostLevel.Text.Trim());
            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_EMPLOYEESIGNINRECORD", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "POSTLEVEL", tbPostLevel.Text, postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));


            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "EMPLOYEEFULLNAME", Info.EMPLOYEENAME, lkEmployeeName.TxtLookUp.Text));
            if (SignInDetailList.Count > 0)
            {
                //漏打
                var entForgot = from ent in SignInDetailList
                                where ent.REASONCATEGORY == "1"
                                select ent;
                //因公外出
                var entOuts = from ent in SignInDetailList
                              where ent.REASONCATEGORY == "3"
                              select ent;
                //没有因公外出则填充因公外出
                if ( entOuts.Count() ==0)
                {
                    AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "SIGNINCATEGORY", "1", "漏打"));
                }
                else
                {
                    AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "SIGNINCATEGORY", "3", "因公外出"));
                }
            }
            foreach (var v in SignInDetailList)
            {
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "ABNORMCATEGORY", v.ABNORMCATEGORY, abnormcategory[v.ABNORMCATEGORY.ToString()], v.SIGNINDETAILID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "REASONCATEGORY", v.REASONCATEGORY, reson[v.REASONCATEGORY.ToString()], v.SIGNINDETAILID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "ATTENDPERIOD", v.ATTENDPERIOD, dperiod[v.ATTENDPERIOD.ToString()], v.SIGNINDETAILID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "SIGNINID", Info.SIGNINID, "", v.SIGNINDETAILID));
                if (v.ABNORMALDATE!=null)
                {
                    //日期格式tostring的时候程序会根据本机电脑设置的事情格式去生成,所以这里要加和格式设置(很奇怪吧,很多情况都会这样,例如我把我电脑日期设置后面加上中文"哈哈",那么日期格式tostring的时候就会变成"2013-8-1 哈哈")
                    AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "ABNORMALDATE", v.ABNORMALDATE.Value.ToString("yyyy-MM-dd"), v.ABNORMALDATE.Value.ToString("yyyy-MM-dd"), v.SIGNINDETAILID));
                }
               
            }
            string a = mx.TableToXml(Info, SignInDetailList, StrSource, AutoList);

            return a;
        }
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESALARYPOSTASIGN 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;

            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_EMPLOYEESALARYPOSTASIGN", "CHECKSTATE", "1", checkState));

            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTID", Info.BALANCEPOSTID, Info.BALANCEPOSTID));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTNAME", Info.BALANCEPOSTNAME, Info.BALANCEPOSTNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "NOTESCONTENT", strRemarkNotes, strRemarkNotes));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));

            ObservableCollection<Object> TrListObj = new ObservableCollection<Object>();
            foreach (var item in listDetails)
            {
                item.EMPLOYEENAME = item.EMPLOYEENAME + "-" + item.EMPLOYEEPOSTNAME + "-" + item.EMPLOYEEDEPARTMENTNAME + "-" + item.EMPLOYEECOMPANYNAME;
                TrListObj.Add(item);
            }

            string a = mx.TableToXml(Info, TrListObj, StrSource, AutoList);

            return a;
        }
예제 #26
0
        private string GetXmlString(string StrSorce, T_FB_BORROWAPPLYMASTER Info)
        {
            string goouttomeet = string.Empty;
            string privateaffair = string.Empty;
            string companycar = string.Empty;
            string isagent = string.Empty;

            SMT.SaaS.MobileXml.MobileXml mx = new MobileXml();
            SMT.SaaS.MobileXml.AutoDictionary ad = new AutoDictionary();
            List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>();
            AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "PAYTARGET", Info.PAYTARGET.ToString(), "个人"));//付款方式
            AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "ISREPAIED", Info.ISREPAIED.ToString(), Info.ISREPAIED.ToString() == "0" ? "否" : "是"));//是否还情

            string StrPayType = "";
            string StrEditState = "";
            switch (Info.REPAYTYPE.ToString())
            {
                case "1":
                    StrPayType = "普通借款";
                    break;
                case "2":
                    StrPayType = "备用金借款";
                    break;
                case "3":
                    StrPayType = "专项借款";
                    break;
            }
            switch (Info.EDITSTATES.ToString())
            {
                case "0":
                    StrEditState = "删除状态";
                    break;
                case "1":
                    StrEditState = "已生效";
                    break;
                case "2":
                    StrEditState = "未生效";
                    break;
                case "3":
                    StrEditState = "撤消中";
                    break;
                case "4":
                    StrEditState = "已撤消";
                    break;
            }
            AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "POSTLEVEL", txPostLevel, null));//POSTLEVEL
            AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "CHECKSTATES", "1", "审核中"));
            AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "REPAYTYPE", Info.REPAYTYPE.ToString(), StrPayType));//相关单据类型
            AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "EDITSTATES", Info.EDITSTATES.ToString(), StrEditState));//编辑状态
            AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "BORROWAPPLYMASTERCODE", Info.BORROWAPPLYMASTERCODE, Info.BORROWAPPLYMASTERCODE));//单据编号
            if (Info.OWNERID != null && !string.IsNullOrEmpty(strOwnerName))
            {
                AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "OWNERID", Info.OWNERID, strOwnerName + "-" + strOwnerPostName + "-" + strOwnerDepartmentName + "-" + strOwnerCompanyName));
            }
            if (Info.OWNERCOMPANYID != null && !string.IsNullOrEmpty(strOwnerCompanyName))
            {
                AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "OWNERCOMPANYID", Info.OWNERCOMPANYID, strOwnerCompanyName));
            }
            if (Info.OWNERDEPARTMENTID != null && !string.IsNullOrEmpty(strOwnerDepartmentName))
            {
                AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, strOwnerDepartmentName));
            }
            if (Info.OWNERPOSTID != null && !string.IsNullOrEmpty(strOwnerPostName))
            {
                AutoList.Add(basedata("T_FB_BORROWAPPLYMASTER", "OWNERPOSTID", Info.OWNERPOSTID, strOwnerPostName));
            }

            ObservableCollection<T_FB_BORROWAPPLYDETAIL> objB;
            if (borrowDtlList != null && borrowDtlList.Count > 0)
            {
                objB = borrowDtlList;
            }
            else
            {
                objB = boDtlobj;
            }
            foreach (T_FB_BORROWAPPLYDETAIL objDetail in objB)
            {
                if (objDetail.T_FB_SUBJECT != null)
                {
                    AutoList.Add(basedataForChild("T_FB_BORROWAPPLYDETAIL", "SUBJECTID", objDetail.T_FB_SUBJECT.SUBJECTID, objDetail.T_FB_SUBJECT.SUBJECTID, objDetail.BORROWAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_BORROWAPPLYDETAIL", "SUBJECTCODE", objDetail.T_FB_SUBJECT.SUBJECTCODE, objDetail.T_FB_SUBJECT.SUBJECTCODE, objDetail.BORROWAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_BORROWAPPLYDETAIL", "SUBJECTNAME", objDetail.T_FB_SUBJECT.SUBJECTNAME, objDetail.T_FB_SUBJECT.SUBJECTNAME, objDetail.BORROWAPPLYDETAILID));
                }
                if (objDetail.T_FB_BORROWAPPLYMASTER != null)
                {
                    AutoList.Add(basedataForChild("T_FB_BORROWAPPLYDETAIL", "BORROWAPPLYMASTERID", objDetail.T_FB_BORROWAPPLYMASTER.BORROWAPPLYMASTERID, objDetail.T_FB_BORROWAPPLYMASTER.BORROWAPPLYMASTERID, objDetail.BORROWAPPLYDETAILID));
                }
                if (objDetail.CHARGETYPE != null)
                {
                    AutoList.Add(basedataForChild("T_FB_BORROWAPPLYDETAIL", "CHARGETYPE", objDetail.CHARGETYPE.ToString(), objDetail.CHARGETYPE.ToString() == "1" ? "个人预算费用" : "公共预算费用", objDetail.BORROWAPPLYDETAILID));
                }

            }
            string a = mx.TableToXml(Info, objB, StrSorce, AutoList);
            return a;

        }
예제 #27
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEELEAVERECORD 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 = Convert.ToDecimal(tbEmpLevel.Text.Trim());
            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_EMPLOYEELEAVERECORD", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "OWNERPOSTNAME", tbOrgName.Text.Trim(), tbOrgName.Text.Trim()));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "POSTLEVEL", tbEmpLevel.Text.Trim(), postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "EMPLOYEEORGNAME", Info.EMPLOYEENAME, tbEmpName.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "EMPLOYEENAME", Info.EMPLOYEENAME, Info.EMPLOYEENAME));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "TOTALADJUSTLEAVEDAYS", nudTotalAdjustLeaveDays.Value.ToString(), nudTotalAdjustLeaveDays.Value.ToString()));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "DEDUCTDAYS", nudDeductDays.Value.ToString(), nudDeductDays.Value.ToString()));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "TOTALVACATIONDAYS", nudTotalVacationDays.Value.ToString(), nudTotalVacationDays.Value.ToString()));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "LEAVETYPESETID", Info.T_HR_LEAVETYPESET.LEAVETYPESETID, lkLeaveTypeName.TxtLookUp.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "AttachMent", Info.LEAVERECORDID, Info.LEAVERECORDID));
            string strStart = string.Empty;
            string strEnd = string.Empty;
            DateTime dt1 = (DateTime)Info.STARTDATETIME;
            DateTime dt2 = (DateTime)Info.ENDDATETIME;
            //strStart = string.Format("{0:f}",(DateTime)Info.STARTDATETIME); //((DateTime)Info.STARTDATETIME).ToString("yyyy-mm-dd ");
            //strEnd =string.Format("{0:f}",(DateTime)Info.ENDDATETIME); //((DateTime)Info.ENDDATETIME).ToString("");
            //strStart = dt1.ToString("yyyy-mm-dd HH:mm");
            //strEnd = dt2.ToString("yyyy-mm-dd HH:mm");
            strStart = dt1.Year.ToString() + "-" + dt1.Month.ToString() + "-" + dt1.Day.ToString() + " " + dt1.Hour.ToString() + ":" + dt1.Minute.ToString();
            strEnd = dt2.Year.ToString() + "-" + dt2.Month.ToString() + "-" + dt2.Day.ToString() + " " + dt2.Hour.ToString() + ":" + dt2.Minute.ToString();
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "STARTDATETIME", strStart, strStart));
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "ENDDATETIME", strEnd, strEnd));
            double totalDays = nudTotalAdjustLeaveDays.Value + nudDeductDays.Value;
            AutoList.Add(basedata("T_HR_EMPLOYEELEAVERECORD", "TOTALDAYS", Convert.ToString(totalDays), Convert.ToString(totalDays)));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERCOMPANYID", approvalInfo.OWNERCOMPANYID, StrCompanyName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //    AutoList.Add(basedata("T_HR_LEFTOFFICE", "LEFTOFFICECATEGORY", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYVALUE.ToString() : "0", LEFTOFFICECATEGORY != null ? LEFTOFFICECATEGORY.DICTIONARYNAME : ""));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #28
0
        private string GetXmlString(string StrSource, T_HR_DEPARTMENTDICTIONARY Info)
        {

            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;

            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;
            }

            //T_HR_POST fatherPost = lkPost.DataContext as T_HR_POST;
            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_DEPARTMENTDICTIONARY", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_DEPARTMENTDICTIONARY", "CREATEUSERNAME", createUserName, createUserName));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #29
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESIGNINRECORD Info)
        {
            //异常类型
            var abnormcategoryDicts = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "ABNORMCATEGORY");
            Dictionary <string, string> abnormcategory = new Dictionary <string, string>();

            foreach (var abnorm in abnormcategoryDicts)
            {
                abnormcategory.Add(abnorm.DICTIONARYVALUE.ToString(), abnorm.DICTIONARYNAME);
            }

            //异常原因
            var reasoncategoryDicts           = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "REASONCATEGORY");
            Dictionary <string, string> reson = new Dictionary <string, string>();

            foreach (var reason in reasoncategoryDicts)
            {
                reson.Add(reason.DICTIONARYVALUE.ToString(), reason.DICTIONARYNAME);
            }

            //异常时间段
            var dperiodDicts = (Application.Current.Resources["SYS_DICTIONARY"] as List <SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>).Where(s => s.DICTIONCATEGORY == "ATTENDPERIOD");
            Dictionary <string, string> dperiod = new Dictionary <string, string>();

            foreach (var item in dperiodDicts)
            {
                dperiod.Add(item.DICTIONARYVALUE.ToString(), item.DICTIONARYNAME);
            }

            //审核状态
            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 = Convert.ToDecimal(tbPostLevel.Text.Trim());
            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_EMPLOYEESIGNINRECORD", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "POSTLEVEL", tbPostLevel.Text, postLevelName));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "OWNERCOMPANYID", Info.OWNERCOMPANYID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "OWNERPOSTID", Info.OWNERPOSTID, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName));


            AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "EMPLOYEEFULLNAME", Info.EMPLOYEENAME, lkEmployeeName.TxtLookUp.Text));
            if (SignInDetailList.Count > 0)
            {
                //签卡类型
                AutoList.Add(basedata("T_HR_EMPLOYEESIGNINRECORD", "SIGNINCATEGORY", SignInDetailList[0].REASONCATEGORY, reson[SignInDetailList[0].REASONCATEGORY.ToString()]));
            }
            foreach (var v in SignInDetailList)
            {
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "ABNORMCATEGORY", v.ABNORMCATEGORY, abnormcategory[v.ABNORMCATEGORY.ToString()], v.SIGNINDETAILID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "REASONCATEGORY", v.REASONCATEGORY, reson[v.REASONCATEGORY.ToString()], v.SIGNINDETAILID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "ATTENDPERIOD", v.ATTENDPERIOD, dperiod[v.ATTENDPERIOD.ToString()], v.SIGNINDETAILID));
                AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "SIGNINID", Info.SIGNINID, "", v.SIGNINDETAILID));
                if (v.ABNORMALDATE != null)
                {
                    //日期格式tostring的时候程序会根据本机电脑设置的事情格式去生成,所以这里要加和格式设置(很奇怪吧,很多情况都会这样,例如我把我电脑日期设置后面加上中文"哈哈",那么日期格式tostring的时候就会变成"2013-8-1 哈哈")
                    AutoList.Add(basedataForChild("T_HR_EMPLOYEESIGNINDETAIL", "ABNORMALDATE", v.ABNORMALDATE.Value.ToString("yyyy-MM-dd"), v.ABNORMALDATE.Value.ToString("yyyy-MM-dd"), v.SIGNINDETAILID));
                }
            }
            string a = mx.TableToXml(Info, SignInDetailList, StrSource, AutoList);

            return(a);
        }
예제 #30
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEEPOSTCHANGE 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;

            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY POSTCHANGCATEGORY = cbPostCategory.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY TOPOSTLEVEL = cbxPostLevel.SelectedItem as SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY;
            SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY FROMPOSTLEVEL = cbxFromPostLevel.SelectedItem as SMT.Saas.Tools.PermissionWS.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_EMPLOYEEPOSTCHANGE", "CHECKSTATE", "1", checkState));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "POSTCHANGCATEGORY", POSTCHANGCATEGORY == null ? "0" : POSTCHANGCATEGORY.DICTIONARYVALUE.ToString(), POSTCHANGCATEGORY == null ? "" : POSTCHANGCATEGORY.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "TOPOSTLEVEL", TOPOSTLEVEL == null ? "0" : TOPOSTLEVEL.DICTIONARYVALUE.ToString(), TOPOSTLEVEL == null ? "" : TOPOSTLEVEL.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "FROMPOSTLEVEL", FROMPOSTLEVEL == null ? "0" : FROMPOSTLEVEL.DICTIONARYVALUE.ToString(), FROMPOSTLEVEL == null ? "" : FROMPOSTLEVEL.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "POSTLEVEL", TOPOSTLEVEL == null ? "0" : TOPOSTLEVEL.DICTIONARYVALUE.ToString(), TOPOSTLEVEL == null ? "" : TOPOSTLEVEL.DICTIONARYNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "EMPLOYEECNAME", Info.T_HR_EMPLOYEE.EMPLOYEECNAME, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "OWNER", Info.T_HR_EMPLOYEE.EMPLOYEEID, Info.T_HR_EMPLOYEE.EMPLOYEEID));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "CREATEUSERNAME", createUserName, createUserName));

            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "TOPOSTID", Info.TOPOSTID, (lkPost.DataContext as SMT.Saas.Tools.OrganizationWS.T_HR_POST) == null ? "" : (lkPost.DataContext as SMT.Saas.Tools.OrganizationWS.T_HR_POST).T_HR_POSTDICTIONARY.POSTNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "TODEPARTMENTID", Info.TODEPARTMENTID, string.IsNullOrEmpty(txtToDepartment.Text) ? "" : txtToDepartment.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "TOCOMPANYID", Info.TOCOMPANYID, string.IsNullOrEmpty(txtToCompany.Text) ? "" : txtToCompany.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "FROMPOSTID", Info.FROMPOSTID, string.IsNullOrEmpty(txtFromPostID.Text) ? "" : txtFromPostID.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "FROMDEPARTMENTID", Info.FROMDEPARTMENTID, string.IsNullOrEmpty(txtFromDepartmentID.Text) ? "" : txtFromDepartmentID.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "FROMCOMPANYID", Info.FROMCOMPANYID, string.IsNullOrEmpty(txtFromCompanyID.Text) ? "" : txtFromCompanyID.Text));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "ISAGENCY", Info.ISAGENCY, Info.ISAGENCY == "0" ? "非兼职" : "兼职"));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "EMPLOYEEID", Info.T_HR_EMPLOYEE.EMPLOYEEID, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));

            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEEPOSTCHANGE", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));

            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #31
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEECONTRACT 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;


            //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 == "POSTLEVLE" && s.DICTIONARYVALUE == employeepost.POSTLEVEL).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_EMPLOYEECONTRACT", "CHECKSTATE", "1", checkState));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERCOMPANYID", approvalInfo.OWNERCOMPANYID, StrCompanyName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            //AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "EMPLOYEEID", Info.T_HR_EMPLOYEE.EMPLOYEEID, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "POSTLEVEL", EmployeePost.POSTLEVEL.ToString(), EmployeePost.POSTLEVEL.ToString()));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "EMPLOYEECNAME", Info.T_HR_EMPLOYEE.EMPLOYEECNAME, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNER", Info.T_HR_EMPLOYEE.EMPLOYEECNAME, Info.T_HR_EMPLOYEE.EMPLOYEECNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "CREATEUSERNAME", createUserName, createUserName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "AttachMent", Info.EMPLOYEECONTACTID, Info.EMPLOYEECONTACTID));

            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));
            AutoList.Add(basedata("T_HR_EMPLOYEECONTRACT", "NOENDDATE", Info.NOENDDATE, Info.NOENDDATE=="0"?"否":"是"));
            string a = mx.TableToXml(Info, null, StrSource, AutoList);

            return a;
        }
예제 #32
0
        private string GetXmlString(string StrSource, T_HR_EMPLOYEESALARYPOSTASIGN 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;

            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_EMPLOYEESALARYPOSTASIGN", "CHECKSTATE", "1", checkState));
           
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTID", Info.BALANCEPOSTID, Info.BALANCEPOSTID));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "BALANCEPOSTNAME", Info.BALANCEPOSTNAME, Info.BALANCEPOSTNAME));
            AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "NOTESCONTENT", strRemarkNotes, strRemarkNotes));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERCOMPANYID", Info.OWNERCOMPANYID, ownerCompanyName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, ownerDepartmentName));
            //AutoList.Add(basedata("T_HR_EMPLOYEESALARYPOSTASIGN", "OWNERPOSTID", Info.OWNERPOSTID, ownerPostName));

            foreach (T_HR_BALANCEPOSTDETAIL objDetail in EmployeeBalanceInfoList)//填充子表
            {
                string strSalary = "";
                string strAttendance = "";
                if (objDetail.ATTENDANCESET == "0")
                {
                    strAttendance = "否";                    
                }
                else
                {
                    strAttendance = "是";
                }
                if (objDetail.SALARYSET == "0")
                {
                    strSalary = "否";                    
                }
                else
                {
                    strSalary = "是";
                }
                AutoList.Add(basedata("T_HR_BALANCEPOSTDETAIL", "ATTENDANCESET", objDetail.ATTENDANCESET, strAttendance, objDetail.BALANCEPOSTDETAIL));
                AutoList.Add(basedata("T_HR_BALANCEPOSTDETAIL", "SALARYSET", objDetail.SALARYSET, strSalary, objDetail.BALANCEPOSTDETAIL));                
            }
            string a = mx.TableToXml(Info, EmployeeBalanceInfoList, StrSource, AutoList);
            return a;
        }
예제 #33
0
        private string GetXmlString(string StrSorce, T_FB_CHARGEAPPLYMASTER Info)
        {
            string goouttomeet = string.Empty;
            string privateaffair = string.Empty;
            string companycar = string.Empty;
            string isagent = string.Empty;
            List<object> ObjectList = new List<object>();

            SMT.SaaS.MobileXml.MobileXml mx = new MobileXml();
            SMT.SaaS.MobileXml.AutoDictionary ad = new AutoDictionary();
            List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>();
            AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "PAYTARGET", Info.PAYTARGET.ToString(), "个人"));//付款方式

            string StrPayType = "";
            string StrEditState = "";
            string StrRepType = "";
            switch (Info.PAYTYPE.ToString())
            {
                case "1":
                    StrPayType = "个人费用报销";
                    break;
                case "2":
                    StrPayType = "冲借款";
                    break;
                case "3":
                    StrPayType = "冲预付款";
                    break;
                case "4":
                    StrPayType = "付客户款";
                    break;
                case "5":
                    StrPayType = "其他";
                    break;
            }
            switch (Info.EDITSTATES.ToString())
            {
                case "0":
                    StrEditState = "删除状态";
                    break;
                case "1":
                    StrEditState = "已生效";
                    break;
                case "2":
                    StrEditState = "未生效";
                    break;
                case "3":
                    StrEditState = "撤消中";
                    break;
                case "4":
                    StrEditState = "已撤消";
                    break;
            }
            
            
            AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "POSTLEVEL", txPostLevel, null));//POSTLEVEL

            AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "PAYTYPE", Info.PAYTYPE.ToString(), StrPayType));//付款类型
            AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "EDITSTATES", Info.EDITSTATES.ToString(), StrEditState));//编辑状态
            if (Info.T_FB_BORROWAPPLYMASTER != null)
            {
                AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "BORROWAPPLYMASTERID", Info.T_FB_BORROWAPPLYMASTER.BORROWAPPLYMASTERCODE, Info.T_FB_BORROWAPPLYMASTER.BORROWAPPLYMASTERCODE));
            }
            else
            {
                AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "BORROWAPPLYMASTERID", "", ""));
            }
            if (Info.OWNERID != null && !string.IsNullOrEmpty(strOwnerName))
            {
                AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "OWNERID", Info.OWNERID, strOwnerName + "-" + strOwnerPostName + "-" + strOwnerDepartmentName + "-" + strOwnerCompanyName));
            }
            if (Info.OWNERCOMPANYID != null && !string.IsNullOrEmpty(strOwnerCompanyName))
            {
                AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "OWNERCOMPANYID", Info.OWNERCOMPANYID, strOwnerCompanyName));
            }
            if (Info.OWNERDEPARTMENTID != null && !string.IsNullOrEmpty(strOwnerDepartmentName))
            {
                AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "OWNERDEPARTMENTID", Info.OWNERDEPARTMENTID, strOwnerDepartmentName));
            }
            if (Info.OWNERPOSTID != null && !string.IsNullOrEmpty(strOwnerPostName))
            {
                AutoList.Add(basedata("T_FB_CHARGEAPPLYMASTER", "OWNERPOSTID", Info.OWNERPOSTID, strOwnerPostName));
            }

            List<T_FB_CHARGEAPPLYDETAIL> objC;
            if (chargeDtlList != null && chargeDtlList.Count > 0)
            {
                objC = chargeDtlList.ToList();
            }
            else
            {
                objC = chaDtlobj.ToList();
            }
            foreach (T_FB_CHARGEAPPLYDETAIL objDetail in objC)
            {
                if (objDetail.T_FB_SUBJECT != null)
                {
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYDETAIL", "SUBJECTID", objDetail.T_FB_SUBJECT.SUBJECTID, objDetail.T_FB_SUBJECT.SUBJECTID, objDetail.CHARGEAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYDETAIL", "SUBJECTCODE", objDetail.T_FB_SUBJECT.SUBJECTCODE, objDetail.T_FB_SUBJECT.SUBJECTCODE, objDetail.CHARGEAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYDETAIL", "SUBJECTNAME", objDetail.T_FB_SUBJECT.SUBJECTNAME, objDetail.T_FB_SUBJECT.SUBJECTNAME, objDetail.CHARGEAPPLYDETAILID));
                }
                if (objDetail.T_FB_BORROWAPPLYDETAIL != null)
                {
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYDETAIL", "BORROWAPPLYDETAILID", objDetail.T_FB_BORROWAPPLYDETAIL.BORROWAPPLYDETAILID, objDetail.T_FB_BORROWAPPLYDETAIL.BORROWAPPLYDETAILID, objDetail.CHARGEAPPLYDETAILID));
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYDETAIL", "BORROWMONEY", objDetail.T_FB_BORROWAPPLYDETAIL.BORROWMONEY.ToString(), objDetail.T_FB_BORROWAPPLYDETAIL.BORROWMONEY.ToString(), objDetail.CHARGEAPPLYDETAILID));
                }
                if (objDetail.T_FB_CHARGEAPPLYMASTER != null)
                {
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYDETAIL", "CHARGEAPPLYMASTERID", objDetail.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID, objDetail.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID, objDetail.CHARGEAPPLYDETAILID));
                }
                if (objDetail.CHARGETYPE != null)
                {
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYDETAIL", "CHARGETYPE", objDetail.CHARGETYPE.ToString(), objDetail.CHARGETYPE.ToString() == "1" ? "个人预算费用" : "公共预算费用", objDetail.CHARGEAPPLYDETAILID));
                }
                ObjectList.Add(objDetail);
            }
            //add zl 2012.2.15
            List<T_FB_CHARGEAPPLYREPAYDETAIL> objR;
            if (chaRepayDetailData != null && chaRepayDetailData.Count > 0)
            {
                objR = chaRepayDetailData.ToList();
            }
            else
            {
                objR = chaRepDtlobj.ToList();
            }
            foreach (T_FB_CHARGEAPPLYREPAYDETAIL objReDetail in objR)
            {
                switch (objReDetail.REPAYTYPE.ToString())
                {
                    case "1":
                        StrRepType = "普通借款";
                        break;
                    case "2":
                        StrRepType = "备用金借款";
                        break;
                    case "3":
                        StrRepType = "专项借款";
                        break;
                }
                if (objReDetail.T_FB_CHARGEAPPLYMASTER != null)
                {
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYREPAYDETAIL", "CHARGEAPPLYMASTERID", objReDetail.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID, objReDetail.T_FB_CHARGEAPPLYMASTER.CHARGEAPPLYMASTERID, objReDetail.CHARGEAPPLYREPAYDETAILID));
                }
                if (objReDetail.REPAYTYPE != 0)
                {
                    AutoList.Add(basedataForChild("T_FB_CHARGEAPPLYREPAYDETAIL", "REPAYTYPE", objReDetail.REPAYTYPE.ToString(), StrRepType, objReDetail.CHARGEAPPLYREPAYDETAILID));
                }
                ObjectList.Add(objReDetail);
            }
            //add end
            string a = mx.TableToXml(Info, ObjectList, StrSorce, AutoList);
            XElement xe = XElement.Parse(a);
            if (!string.IsNullOrEmpty(Info.BANK))
            {
                xe.Element("Object").Add(new XElement("Attribute",
                    new XAttribute("Name", "LINK"),
                    new XAttribute("LableResourceID", "LINK"),
                    new XAttribute("Description", "事项审批编号"),
                    new XAttribute("DataType", "string"),
                    new XAttribute("DataValue", Info.RECEIVER + "|" + Info.BANK + "|" + Info.BANKACCOUT),
                    new XAttribute("DataText", "")));   
            }   
            xe.Element("Object").Elements("ObjectList").ToArray()[1].Elements().ForEach(item =>
                {
                    var Attr_REPAYTYPE = item.Elements().Where(itemA => itemA.Attribute("Name").Value == "REPAYTYPE").FirstOrDefault();
                    var dataText = "";
                    switch (Attr_REPAYTYPE.Attribute("DataValue").Value)
                    {
                        case "1":
                            dataText = "普通借款";
                            break;
                        case "2":
                            dataText = "备用金借款";
                            break;
                        case "3":
                            dataText = "专项借款";
                            break;
                    }
                    Attr_REPAYTYPE.Attribute("DataText").Value = dataText;
                });
            return xe.ToString();
        }