当前位置: 首页>>代码示例>>C#>>正文


C# PccMsg.CreateParentNode方法代码示例

本文整理汇总了C#中PccMsg.CreateParentNode方法的典型用法代码示例。如果您正苦于以下问题:C# PccMsg.CreateParentNode方法的具体用法?C# PccMsg.CreateParentNode怎么用?C# PccMsg.CreateParentNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PccMsg的用法示例。


在下文中一共展示了PccMsg.CreateParentNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenMasterTableData


//.........这里部分代码省略.........
                    }
                    //再加入加入使用者的Item
                    if (myAuth.IsAddAuth())
                    {
                        myTempMsg.CreateNode("LinkButton");
                        myTempMsg.AddToNode("Image", Session["PageLayer"] + "images/add.gif");
                        myTempMsg.AddToNode("ToolTip", "加入使用者");
                        myTempMsg.AddToNode("href", PICKUSER + "?ApID=" + m_ApID + "&SrcUp_Id=" + m_SrcUp_Id + "&Up_Id=" + myMasterRow["Up_Id"].ToString());
                        myTempMsg.AddToNode("QueryCondition", GetQueryCondition());
                        myTempMsg.AddToNode("Method", GetMethod("AddUserFunc", "Fgrp_Id", "Fgrp_Nm", myMasterRow));
                        myTempMsg.UpdateNode();
                    }
                }

                myRow.AddMultiLinkCell(myTempMsg.GetXmlStr, 15);
                TblDs_Fgrp.Rows.Add(myRow.Row);

                #endregion

                #region 內建廠別明細資料的欄位參數,此處會取得資料,並設定給主表格

                //設定廠別明細欄位中多個Link Image的參數
                myMsg1 = new PccMsg();

                if (del_auth && myMasterRow["Fgrp_Id"].ToString() != Request.Params["SrcUp_Id"])
                {
                    myMsg1.CreateFirstNode("Type", "MultiLink");

                    myMsg1.CreateNode("LinkButton");
                    myMsg1.AddToNode("Image", Session["PageLayer"] + "images/del.gif");
                    myMsg1.AddToNode("ToolTip", "刪除此廠別與此廠群組之關係");
                    myMsg1.AddToNode("href", MYURL + "?ApID=" + m_ApID + "&SrcUp_Id=" + m_SrcUp_Id + "&Up_Id=" + myMasterRow["Up_Id"].ToString() + "&Fgrp_Nm=" + myMasterRow["Fgrp_Nm"].ToString());
                    myMsg1.AddToNode("QueryCondition", GetQueryCondition());
                    myNode = myMsg1.CreateParentNode("Method");
                    myMsg1.AddToNode("MethodName", "FactDelFunc", ref myNode);
                    myMsg1.AddToNode("Key", "factgrp_id", ref myNode);
                    myMsg1.AddToNode("KeyOther", "fact_no", ref myNode);
                    myMsg1.UpdateNode(myNode);
                    myMsg1.UpdateNode();

                }
                else
                {
                    myMsg1.CreateFirstNode("Type", "Space");
                }

                FFieldType[5] = myMsg1.GetXmlStr;

                //設定要取得廠別資料的XML
                myMsg1.LoadXml();
                myMsg1.CreateFirstNode("Fgrp_Id", myMasterRow["Fgrp_Id"].ToString());
                tblFactGroup = mybs.DoReturnDataSet("get_DS_FACTGRPByFgrpID", myMsg1.GetXmlStr, string.Empty).Tables["DS_FACTGRP"];

                PccDetailTable myFDTable = new PccDetailTable("FDT" + myMasterRow["Fgrp_Id"].ToString());
                myFDTable.ClassXML = strClassXML;
                myFDTable.Fields = FFields;
                myFDTable.FieldsPercent = FFieldsPercent;
                myFDTable.FieldsItem = FFieldsItem;
                myFDTable.FieldsType = FFieldType;
                myFDTable.NewDataTable = tblFactGroup;

                myFDTable.Create();

                myRow.Reset();
                myRow.SetRowCss("off");
                myRow.SetRowID("view_F" + MasterCount);
开发者ID:quangtrung00,项目名称:QCLogBlook,代码行数:67,代码来源:FactGroupDetail104.aspx.cs

示例2: GenMasterTableData

    private void GenMasterTableData(ref PccErrMsg myLabel)
    {
        //取得Login的使用者是否有刪除的權限
        GetMenuAuth myAuth = new GetMenuAuth();
        bool del_auth = myAuth.IsDeleteAuth();

        PccBsSystemForC.bs_ApManager mybs = new PccBsSystemForC.bs_ApManager(ConfigurationManager.AppSettings["ConnectionType"], ConfigurationManager.AppSettings["ConnectionServer"], ConfigurationManager.AppSettings["ConnectionDB"], ConfigurationManager.AppSettings["ConnectionUser"], ConfigurationManager.AppSettings["ConnectionPwd"], Session["UserIDAndName"].ToString(), ConfigurationManager.AppSettings["EventLogPath"]);
        PccMsg myMsg = new PccMsg();
        myMsg.CreateFirstNode("StartRecord", PageControl1.StartRecord.ToString());
        myMsg.CreateFirstNode("PageSize", PageControl1.PageSize.ToString());
        myMsg.CreateFirstNode("Vpath", ConfigurationManager.AppSettings["vpath"].ToString());
        myMsg.CreateFirstNode("ApName", txtApName.Text);
        string strXML = myMsg.GetXmlStr;
        DataSet myApDs = mybs.DoReturnDataSet("GetApByVpath", strXML, "");

        DataTable myApData = myApDs.Tables["Ap"];

        if (myApData.Rows.Count > 0)
        {
            int MasterCount = 0;
            string MasterStyle = "";
            PccMsg myTempMsg;

            PccRow myRow;

            //取出資料總筆數
            PageControl1.TotalSize = myApDs.Tables["TCounts"].Rows[0]["Counts"].ToString();
            PageControl1.BuildPager();

            //明細資料類別之共同參數
            myMsg.LoadXml();
            myMsg.CreateFirstNode("TableClass", "ActDocTB");
            myMsg.CreateFirstNode("RowHeaderClass", "TDShowHeader");
            myMsg.CreateFirstNode("RowClass1", "ffd000");
            myMsg.CreateFirstNode("RowClass2", "fff000");
            string strClassXML = myMsg.GetXmlStr;

            XmlElement myNode;

            //明細資料的欄位參數
            string strOrgFields5 = "link-新增選單-" + MENUADDNEW + "?ApID=" + Request.Params["ApID"].ToString() + "&Type=New&QueryCondition=" + GetQueryCondition();
            string[] Fields = { "編號", "選單編碼", "選單名稱", "選單連結", "管理區", strOrgFields5 };
            int[] FieldsPercent = { 5, 8, 17, 50, 10, 10 };
            string[] FieldsItem = { "--NO--", "menu_no", "menu_nm", "menu_link", "manage_mk", "menu_id" };
            string[] FieldsType = new string[6];
            FieldsType[0] = "--NO--";
            FieldsType[1] = "<PccMsg><Type>Text</Type></PccMsg>";
            FieldsType[2] = "<PccMsg><Type>Text</Type></PccMsg>";
            FieldsType[3] = "<PccMsg><Type>Text</Type></PccMsg>";
            FieldsType[4] = "<PccMsg><Type>Text</Type></PccMsg>";

            //設定明細欄位中多個Link Image的參數
            myMsg.LoadXml();
            myMsg.CreateFirstNode("Type", "MultiLink");

            //設定第一個更新選單的Image參數
            myMsg.CreateNode("LinkButton");
            myMsg.AddToNode("Image", Session["PageLayer"] + "images/edit.gif");
            myMsg.AddToNode("ToolTip", "更新選單");
            myMsg.AddToNode("href", MENUADDNEW + "?ApID=" + Request.Params["ApID"].ToString());
            myMsg.AddToNode("QueryCondition", GetQueryCondition());
            myNode = myMsg.CreateParentNode("Method");
            myMsg.AddToNode("MethodName", "DetailUpdFunc", ref myNode);
            myMsg.AddToNode("Key", "menu_id", ref myNode);
            myMsg.AddToNode("KeyOther", "menu_nm", ref myNode);
            myMsg.UpdateNode(myNode);
            myMsg.UpdateNode();

            if (del_auth)
            {
                //設定第二個刪除選單的Image參數
                myMsg.CreateNode("LinkButton");
                myMsg.AddToNode("Image", Session["PageLayer"] + "images/del.gif");
                myMsg.AddToNode("ToolTip", "刪除選單");
                myMsg.AddToNode("href", APMANAGE + "?ApID=" + Request.Params["ApID"].ToString());
                myMsg.AddToNode("QueryCondition", GetQueryCondition());
                myNode = myMsg.CreateParentNode("Method");
                myMsg.AddToNode("MethodName", "DetailDelFunc", ref myNode);
                myMsg.AddToNode("Key", "menu_id", ref myNode);
                myMsg.AddToNode("KeyOther", "menu_nm", ref myNode);
                myMsg.UpdateNode(myNode);
                myMsg.UpdateNode();
            }

            FieldsType[5] = myMsg.GetXmlStr;

            //要取得明細資料的Table變數
            DataTable tblMenuByApID;

            //再利用此Table再取得其每一列的資料,再Gen出主要的Table Row.
            foreach (DataRow myMasterRow in myApData.Rows)
            {
                if (MasterCount % 2 == 0) MasterStyle = "eee000"; else MasterStyle = "fff000";
                myRow = new PccRow();
                myRow.SetRowCss(MasterStyle);
                //編號
                myRow.AddTextCell(PageControl1.ListCount, 5);
                //應用程式編碼
                myRow.AddTextCell(myMasterRow["ap_id"].ToString(), 10);
                //應用程式名稱
//.........这里部分代码省略.........
开发者ID:quangtrung00,项目名称:QCLogBlook,代码行数:101,代码来源:ApManage104.aspx.cs


注:本文中的PccMsg.CreateParentNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。