コード例 #1
0
 private AutoDictionary basedata(string TableName, string Name, string Value, string Text)
 {
     string[] strlist = new string[4];
     strlist[0] = TableName;
     strlist[1] = Name;
     strlist[2] = Value;
     strlist[3] = Text;
     AutoDictionary ad = new AutoDictionary();
     ad.AutoDictionaryList(strlist);
     return ad;
 }
コード例 #2
0
 private AutoDictionary basedata(string TableName, string Name, string Value, string Text, string keyValue)
 {
     string[] strlist = new string[5];
     strlist[0] = TableName;
     strlist[1] = Name;
     strlist[2] = Value;
     strlist[3] = Text;
     strlist[4] = keyValue;
     AutoDictionary ad = new AutoDictionary();
     ad.AutoDictionaryChiledList(strlist);
     return ad;
 }
コード例 #3
0
ファイル: BorrowAppForm.xaml.cs プロジェクト: JuRogn/OA
        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;

        }
コード例 #4
0
ファイル: SignInRdForm.xaml.cs プロジェクト: JuRogn/OA
 private AutoDictionary basedataForChild(string TableName, string Name, string Value, string Text, string keyValue)
 {
     string[] strlist = new string[5];
     strlist[0] = TableName;
     strlist[1] = Name;
     strlist[2] = Value;
     strlist[3] = Text;
     strlist[4] = keyValue;
     AutoDictionary ad = new AutoDictionary();
     ad.AutoDictionaryChiledList(strlist);//这里需要传递5个参数过去,keyvalue就是该表的主键ID
     return ad;
 }
コード例 #5
0
ファイル: ChargeApplyForm.xaml.cs プロジェクト: JuRogn/OA
        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();
        }
コード例 #6
0
ファイル: RepayApplyForm.xaml.cs プロジェクト: JuRogn/OA
        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;

        }