Esempio n. 1
0
 public void WriteXml(StringBuilder sb, int indent)
 {
     YndXml.ValueTag(sb, indent, "AreaID", AreaID.ToString());
     YndXml.ValueTag(sb, indent, "NodeID", NodeID.ToString());
     YndXml.ValueTag(sb, indent, "JunctionID", JunctionID.ToString());
     YndXml.ValueTag(sb, indent, "Unk0", Unk0.ToString());
 }
Esempio n. 2
0
        public void WriteXml(StringBuilder sb, int indent, NodeLink[] allLinks)
        {
            Vector3 p = new Vector3();

            p.X = PositionX / 4.0f;
            p.Y = PositionY / 4.0f;
            p.Z = PositionZ / 32.0f;
            int linkCount    = LinkCountFlags.Value >> 3;
            int linkCountUnk = LinkCountFlags.Value & 7;

            YndXml.ValueTag(sb, indent, "AreaID", AreaID.ToString());
            YndXml.ValueTag(sb, indent, "NodeID", NodeID.ToString());
            YndXml.StringTag(sb, indent, "StreetName", YndXml.HashString(StreetName));
            YndXml.SelfClosingTag(sb, indent, "Position " + FloatUtil.GetVector3XmlString(p));
            YndXml.ValueTag(sb, indent, "Flags0", Flags0.Value.ToString());
            YndXml.ValueTag(sb, indent, "Flags1", Flags1.Value.ToString());
            YndXml.ValueTag(sb, indent, "Flags2", Flags2.Value.ToString());
            YndXml.ValueTag(sb, indent, "Flags3", Flags3.Value.ToString());
            YndXml.ValueTag(sb, indent, "Flags4", Flags4.Value.ToString());
            YndXml.ValueTag(sb, indent, "Flags5", linkCountUnk.ToString());

            NodeLink[] links = null;
            if (linkCount > 0)
            {
                links = new NodeLink[linkCount];
                for (int i = 0; i < linkCount; i++)
                {
                    links[i] = allLinks[LinkID + i];
                }
            }
            YndXml.WriteItemArray(sb, links, indent, "Links");
        }
    protected void btnOk_Click(object sender, EventArgs e)
    {
        if (!CanManageAlternativeURLs)
        {
            RedirectToAccessDenied(RESOURCE_NAME, PERMISSION_NAME);
        }

        // Save alternative URL or display error message if error occurred
        var error = SaveData(alternativeUrl);

        if (String.IsNullOrEmpty(error))
        {
            var commandArgument = (e as System.Web.UI.WebControls.CommandEventArgs)?.CommandArgument as string;
            if (String.Equals(commandArgument, COMMAND_ARGUMENT_SAVE_ANOTHER, StringComparison.Ordinal))
            {
                var url = UrlResolver.ResolveUrl("~/CMSModules/Content/CMSDesk/Properties/Urls_AlternativeUrlEdit.aspx");
                url = URLHelper.AddParameterToUrl(url, "nodeid", NodeID.ToString());
                url = URLHelper.AddParameterToUrl(url, "saved", "1");
                URLHelper.Redirect(url);
            }
            URLHelper.Redirect(GetListingUrl());
        }
        else
        {
            ShowError(error);
        }
    }
Esempio n. 4
0
    private string GetEditUrl(TreeNode node)
    {
        string url = null;

        if (node.HasSKU && ModuleEntry.IsModuleLoaded(ModuleEntry.ECOMMERCE))
        {
            url = "~/CMSModules/Ecommerce/Pages/Content/Product/Product_Edit_General.aspx";
        }
        else
        {
            url = "~/CMSModules/Content/CMSDesk/Edit/Edit.aspx";
        }

        url = URLHelper.AddParameterToUrl(url, "nodeid", NodeID.ToString());
        url = URLHelper.AddParameterToUrl(url, "action", "newculture");
        url = URLHelper.AddParameterToUrl(url, "mode", Mode);
        url = URLHelper.AddParameterToUrl(url, "parentculture", RequiredCulture);

        if (IsInCompare)
        {
            url = URLHelper.AddParameterToUrl(url, "compare", "1");
        }

        if (RequiresDialog)
        {
            url = URLHelper.AddParameterToUrl(url, "dialog", "1");
        }

        return(url);
    }
Esempio n. 5
0
    public void CreateHtmlFunc(HttpRequest r, bool c, M_CommonData cdate, DataTable table)
    {
        M_Node nnn = bnode.GetNodeXML(NodeID);

        if (nnn.ListPageHtmlEx < 3 && quickmake.Checked == true)
        {
            B_Create CreateBll = new B_Create(r);
            if (c)
            {
                CreateBll.createann(cdate.GeneralID.ToString());    //发布内容页
                CreateBll.CreateColumnByID(NodeID.ToString());      //发布栏目页
            }
            CreateBll.CreatePageIndex();                            //发布首页
        }
        string[] strArr = bfield.GetIsChain(ModelID, 1).Split(','); //需要替换的字段
        for (int i = 0; i < strArr.Length; i++)
        {
            DataRow[] dr = table.Select("FieldName = '" + strArr[i] + "' ");
            if (dr != null && dr.Length > 0)
            {
                dr[0]["FieldValue"] = wordBll.RePlaceKeyWord(dr[0]["FieldValue"].ToString());
            }
        }
        contentBll.UpdateContent(table, cdate);
    }
Esempio n. 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadData();

        if (!mShowOriginalPageColumn)
        {
            HideGridColumns(new[]
            {
                "ABTestOriginalPage"
            });
        }

        // Set nice 'No data' message (message differs based on whether the user is in content tree or on on-line marketing tab
        gridElem.ZeroRowsText = GetString(NodeID > 0 ? "abtesting.abtest.nodataondocument" : "abtesting.abtest.nodata");

        string url = UIContextHelper.GetElementUrl("CMS.ABTest", "Detail", gridElem.EditInDialog);

        url = URLHelper.AddParameterToUrl(url, "objectid", "{0}");
        url = URLHelper.AddParameterToUrl(url, "aliasPath", AliasPath);

        if (NodeID > 0)
        {
            url = URLHelper.AddParameterToUrl(url, "NodeID", NodeID.ToString());
        }

        gridElem.EditActionUrl = url;
    }
Esempio n. 7
0
 public void WriteXml(StringBuilder sb, int indent)
 {
     YndXml.ValueTag(sb, indent, "ToAreaID", AreaID.ToString());
     YndXml.ValueTag(sb, indent, "ToNodeID", NodeID.ToString());
     YndXml.ValueTag(sb, indent, "Flags0", Flags0.Value.ToString());
     YndXml.ValueTag(sb, indent, "Flags1", Flags1.Value.ToString());
     YndXml.ValueTag(sb, indent, "Flags2", Flags2.Value.ToString());
     YndXml.ValueTag(sb, indent, "LinkLength", LinkLength.Value.ToString());
 }
Esempio n. 8
0
        public ActionResult MyContent()
        {
            string    Status  = Request.QueryString["Status"] ?? "";
            DataTable nodeDT  = nodeBll.SelByPid(0, true);
            string    nodeids = upBll.GetNodeIDS(mu.GroupID);

            if (!string.IsNullOrEmpty(nodeids))
            {
                nodeDT.DefaultView.RowFilter = "NodeID in(" + nodeids + ")";
            }
            else
            {
                nodeDT.DefaultView.RowFilter = "1>2";//无权限,则去除所有
            }
            nodeDT = nodeDT.DefaultView.ToTable();
            C_TreeView treeMod = new C_TreeView()
            {
                NodeID       = "NodeID",
                NodeName     = "NodeName",
                NodePid      = "ParentID",
                DataSource   = nodeDT,
                liAllTlp     = "<a href='MyContent'>全部内容</a>",
                LiContentTlp = "<a href='MyContent?NodeID=@NodeID'>@NodeName</a>",
                SelectedNode = NodeID.ToString()
            };

            if (NodeID != 0)
            {
                M_Node nod = nodeBll.GetNodeXML(NodeID);
                if (nod.NodeListType == 2)
                {
                    return(RedirectToAction("ProductList", new { NodeID = NodeID }));//跳转到商城
                }
                string   ModeIDList     = nod.ContentModel;
                string[] ModelID        = ModeIDList.Split(',');
                string   AddContentlink = "";
                for (int i = 0; i < ModelID.Length; i++)
                {
                    M_ModelInfo infoMod = modBll.SelReturnModel(DataConverter.CLng(ModelID[i]));
                    if (infoMod == null)
                    {
                        continue;
                    }
                    if (infoMod.ModelType != 5)
                    {
                        AddContentlink += "<a href='AddContent?NodeID=" + NodeID + "&ModelID=" + infoMod.ModelID + "' class='btn btn-info' style='margin-right:5px;'><i class='zi zi_plus'></i> 添加" + infoMod.ItemName + "</a>";
                    }
                }
                ViewBag.addhtml = AddContentlink;
            }
            PageSetting setting = conBll.SelContent(CPage, PSize, NodeID, Status, mu.UserName, Request["skey"]);

            ViewBag.Status  = Status;
            ViewBag.treeMod = treeMod;
            return(View(setting));
        }
    /// <summary>
    /// Initializes the master page elements.
    /// </summary>
    private void InitializeMasterPage()
    {
        HeaderActions hdrActions = CurrentMaster.HeaderActions;

        string url = "~/CMSModules/Ecommerce/Pages/Tools/Products/Product_New.aspx";

        url = URLHelper.AddParameterToUrl(url, "siteId", CMSContext.CurrentSiteID.ToString());
        url = URLHelper.AddParameterToUrl(url, "parentNodeId", NodeID.ToString());

        TreeNode currentNode = null;

        if (NodeID <= 0)
        {
            // Add "New product" action when tree is visible (it has own 'New' action)
            if (!DisplayTreeInProducts)
            {
                hdrActions.ActionsList.Add(new HeaderAction
                {
                    Text        = GetString("com.sku.newsku"),
                    RedirectUrl = url,
                    ImageUrl    = GetImageUrl("Objects/Ecommerce_SKU/add.png")
                });
            }
        }
        else
        {
            currentNode = docList.Node;

            // Setup the link to the parent document
            if ((currentNode != null) && (currentNode.NodeClassName.ToLowerCSafe() != "cms.root") && (currentNode.NodeAliasPath.CompareToCSafe(ProductsStartingPath, true) != 0))
            {
                string actionUrl = ShowSections ? "javascript:SelectItem(" + currentNode.NodeParentID + ");" : "javascript:EditItem(" + currentNode.NodeParentID + ");";
                hdrActions.ActionsList.Add(new HeaderAction
                {
                    ControlType = HeaderActionTypeEnum.Hyperlink,
                    Text        = GetString("com.ParentSection"),
                    RedirectUrl = actionUrl,
                    ImageUrl    = GetImageUrl("CMSModules/CMS_Content/Listing/parent.png")
                });
            }

            // Display the "Edit section" action when section selected
            if ((currentNode != null) && (currentNode.NodeAliasPath != "/"))
            {
                hdrActions.ActionsList.Add(new HeaderAction
                {
                    Text          = GetString("com.productsection.editthis"),
                    RedirectUrl   = "#",
                    ImageUrl      = ResolveUrl(GetDocumentTypeIconUrl(currentNode.ClassName)),
                    OnClientClick = "parent.SetMode('sectionedit'); return false;"
                });
            }
        }
    }
Esempio n. 10
0
        public IActionResult CreateHtmlContent()
        {
            if (!B_ARoleAuth.AuthCheckEx(ZLEnum.Auth.content, "create"))
            {
                return(WriteErr("无权进行该操作"));
            }
            if (Request.IsAjax())
            {
                VM_Create vm  = new VM_Create();
                int       nid = Convert.ToInt32(Request.Form["nid"]);
                DataTable dt  = nodeBll.GetNodeChildList(nid);
                dt.Columns.Add(new DataColumn("icon", typeof(string)));
                dt.Columns.Add(new DataColumn("oper", typeof(string)));
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow dr = dt.Rows[i];
                    dt.Rows[i]["icon"] = vm.ShowIcon(dr); //ShowIcon(Convert.ToInt32(dr["NodeID"]), dr["NodeName"].ToString(), dr["NodeDir"].ToString(), Convert.ToInt32(dr["ChildCount"]));
                    dt.Rows[i]["oper"] = vm.GetOper(dr);  // GetOper(dr);
                }
                string json = JsonConvert.SerializeObject(dt);
                return(Content(json));
            }
            //----------单节点直接生成
            string CType = GetParam("CType");

            if (!string.IsNullOrEmpty(CType) && NodeID > 0)
            {
                M_Release relMod = new M_Release();
                switch (CType)
                {
                case "node":
                    relMod.MyRType = M_Release.RType.NodeIDS;
                    break;

                case "content":
                    relMod.MyRType = M_Release.RType.ByNodeIDS;
                    break;

                case "spage":
                    relMod.MyRType = M_Release.RType.SPage;
                    break;

                case "spec":
                    relMod.MyRType = M_Release.RType.Special;
                    break;
                }
                relMod.NodeIDS = NodeID.ToString();
                relBll.Insert(relMod);
                return(RedirectToAction("CreateHtml"));
            }

            return(View("Create/CreateHtmlContent"));
        }
Esempio n. 11
0
    /// <summary>
    /// Initializes the master page elements.
    /// </summary>
    private void InitializeMasterPage()
    {
        HeaderActions hdrActions = CurrentMaster.HeaderActions;

        string url = "~/CMSModules/Ecommerce/Pages/Tools/Products/Product_New.aspx";

        url = URLHelper.AddParameterToUrl(url, "siteId", SiteContext.CurrentSiteID.ToString());
        url = URLHelper.AddParameterToUrl(url, "parentNodeId", NodeID.ToString());

        if (NodeID <= 0)
        {
            // Add "New product" action when tree is not visible (it has own 'New' action)
            if (!DisplayTreeInProducts)
            {
                hdrActions.ActionsList.Add(new HeaderAction
                {
                    Text        = GetString("com.sku.newsku"),
                    RedirectUrl = url
                });
            }
        }
        else
        {
            TreeNode currentNode = docList.Node;

            // Setup the link to the parent document
            if ((currentNode != null) && (currentNode.NodeClassName.ToLowerCSafe() != "cms.root") && (currentNode.NodeAliasPath.CompareToCSafe(ProductsStartingPath, true) != 0))
            {
                string actionUrl = ShowSections ? "javascript:SelectItem(" + currentNode.NodeParentID + ");" : "javascript:EditItem(" + currentNode.NodeParentID + ");";
                hdrActions.ActionsList.Add(new HeaderAction
                {
                    Text        = GetString("com.ParentSection"),
                    RedirectUrl = actionUrl,
                    ButtonStyle = ButtonStyle.Default
                });
            }

            // Display the "Edit section" action when section selected
            if ((currentNode != null) && (currentNode.NodeAliasPath != "/"))
            {
                hdrActions.ActionsList.Add(new HeaderAction
                {
                    Text          = GetString("com.productsection.editthis"),
                    RedirectUrl   = "#",
                    OnClientClick = "parent.SetMode('sectionedit'); return false;",
                    ButtonStyle   = ButtonStyle.Default
                });

                EnsureProductBreadcrumbs(PageBreadcrumbs, currentNode.GetDocumentName(), true);
            }
        }
    }
Esempio n. 12
0
        public override string ToString()
        {
            //return Unused0.ToString() + ", " + Unused1.ToString() + ", " + Unused2.ToString() + ", " +
            //       Unused3.ToString() + ", " + AreaID.ToString() + ", " + NodeID.ToString() + ", " +
            //       UnknownInterp.ToString() + ", " + HeuristicCost.ToString() + ", " + LinkID.ToString() + ", " +
            //       PositionX.ToString() + ", " + PositionY.ToString() + ", " + Unk20.ToString() + ", " + Unk21.ToString() + ", " +
            //       Unk22.ToString() + ", " + Unk24.ToString() + ", " + Unk26.ToString();

            return(AreaID.ToString() + ", " + NodeID.ToString() + ", " + StreetName.ToString());// + ", X:" +
            //PositionX.ToString() + ", Y:" + PositionY.ToString() + ", " + PositionZ.ToString();// + ", " +
            //Flags0.ToString() + ", " + Flags1.ToString() + ", Z:" +
            //Flags2.ToString() + ", " + LinkCountFlags.ToString() + ", " +
            //Flags3.ToString() + ", " + Flags4.ToString();
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        bool hasNodeIdAndCulture = ((NodeID > 0) && (Culture != null));

        if (hasNodeIdAndCulture)
        {
            // Toolbar URL
            string toolbarUrl = "~/CMSModules/Content/CMSDesk/SplitView/Toolbar.aspx";
            toolbarUrl = URLHelper.AddParameterToUrl(toolbarUrl, "nodeid", NodeID.ToString());
            toolbarUrl = URLHelper.AddParameterToUrl(toolbarUrl, "culture", Culture);

            // Separator URL
            splitView.SeparatorUrl  = "~/CMSModules/Content/CMSDesk/SplitView/Separator.aspx";
            splitView.ToolbarUrl    = toolbarUrl;
            splitView.ToolbarHeight = 35;
        }
    }
Esempio n. 14
0
        protected void Bind_DP()
        {
            this.DDLNode.DataSource     = this.bnode.GetNodeListContainXML(0);
            this.DDLNode.DataTextField  = "NodeName";
            this.DDLNode.DataValueField = "NodeID";
            this.DDLNode.DataBind();
            ListItem item = new ListItem("所有栏目", "0");

            this.DDLNode.Items.Insert(0, item);
            this.DDLNode.SelectedValue = NodeID.ToString();
            DataTable dt1 = Sql.Sel("ZL_Node", "ParentID", 0);

            dt1.DefaultView.RowFilter = "NodeID in (1,2) or ParentID in (1,2)";
            dt1 = dt1.DefaultView.ToTable();
            this.nodeList.DataSource = dt1;
            this.nodeList.DataBind();
        }
Esempio n. 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            B_Admin badmin = new B_Admin();

            Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='../Config/SiteOption.aspx'>系统设置</a></li><li><a href='NodeManage.aspx'>节点管理</a></li><li class=\"active\">添加外部链接</li>");
            if (!IsPostBack)
            {
                B_ARoleAuth.CheckEx(ZLEnum.Auth.model, "NodeEdit");
                if (Pid == 0)
                {
                    this.LblNodeName.Text = "根节点";
                }
                else
                {
                    M_Node node = this.bll.GetNodeXML(Pid);
                    if (node.IsNull)
                    {
                        this.LblNodeName.Text = "根节点";
                    }
                    else
                    {
                        this.LblNodeName.Text = node.NodeName;
                    }
                }
                if (NodeID > 0)
                {
                    M_Node nodemod = bll.GetNodeXML(NodeID);
                    this.HdnNodeID.Value    = NodeID.ToString();
                    this.HdnDepth.Value     = nodemod.Depth.ToString();
                    this.HdnParentId.Value  = nodemod.ParentID.ToString();
                    this.HdnOrderID.Value   = nodemod.OrderID.ToString();
                    this.TxtNodeName.Text   = nodemod.NodeName;
                    this.TxtNodeDir.Text    = nodemod.NodeDir;
                    this.TxtNodeUrl.Text    = nodemod.NodeUrl;
                    this.TxtNodePicUrl.Text = nodemod.NodePic;
                    this.TxtTips.Text       = nodemod.Tips;
                }
                else
                {
                    this.HdnParentId.Value = Pid.ToString();
                    this.HdnDepth.Value    = bll.GetDepth(Pid).ToString();
                    this.HdnOrderID.Value  = (bll.GetMaxOrder(Pid) + 1).ToString();
                }
            }
        }
Esempio n. 16
0
        private void MyBind()
        {
            M_UserInfo        mu    = buser.GetLogin();
            M_Design_SiteInfo sfMod = sfBll.SelReturnModel(SiteID);

            Domain = B_IDC_DomainList.GetMyDomain(sfMod.DomainID);
            sfBll.CheckAuthEx(sfMod, mu);
            string nids = "";

            if (NodeID > 0)
            {
                nids = NodeID.ToString();
                M_Node   nod            = bNode.SelReturnModel(NodeID);
                string   ModeIDList     = nod.ContentModel;
                string[] ModelID        = ModeIDList.Split(',');
                string   AddContentlink = "";
                for (int i = 0; i < ModelID.Length; i++)
                {
                    M_ModelInfo infoMod = bmode.SelReturnModel(DataConverter.CLng(ModelID[i]));
                    if (infoMod == null)
                    {
                        continue;
                    }
                    if (infoMod.ModelType != 5)
                    {
                        AddContentlink += "<a href='AddContent.aspx?SiteID=" + SiteID + "&NodeID=" + NodeID + "&ModelID=" + infoMod.ModelID + "' class='btn btn-info' style='margin-right:5px;'><i class='fa fa-plus'></i> 添加" + infoMod.ItemName + "</a>";
                    }
                }
                AddContent_L.Text = AddContentlink;
            }
            else
            {
                nids = sfNodeBll.SelToIDS(SiteID);
            }

            //int type = DataConverter.CLng(DropDownList1.SelectedValue);
            if (Status.Equals("-2"))
            {
                Rel_Btn.Visible = true;
            }                                                   //回收站
            EGV.DataSource = bll.Search(TxtSearchTitle.Text, "", nids, Status);
            EGV.DataBind();
        }
Esempio n. 17
0
    /// <summary>
    /// Initializes the master page elements.
    /// </summary>
    private void InitializeMasterPage()
    {
        string url = "~/CMSModules/Ecommerce/Pages/Tools/Products/Product_New.aspx";

        url = URLHelper.AddParameterToUrl(url, "siteId", SiteContext.CurrentSiteID.ToString());
        url = URLHelper.AddParameterToUrl(url, "parentNodeId", NodeID.ToString());

        // Add "New product" action when tree is not visible (it has own 'New' action)
        if ((NodeID <= 0) && !DisplayTreeInProducts)
        {
            HeaderActions hdrActions = CurrentMaster.HeaderActions;

            hdrActions.ActionsList.Add(new HeaderAction
            {
                Text        = GetString("com.sku.newsku"),
                RedirectUrl = url
            });
        }
    }
    /// <summary>
    /// Builds breadcrumb URL.
    /// </summary>
    private string GenerateBreadCrumbUrl()
    {
        string returnUrl;

        if (QueryHelper.Contains("productid"))
        {
            returnUrl = ResolveUrl("~/CMSModules/Ecommerce/Pages/Tools/Products/Product_Edit_Options.aspx");
            returnUrl = URLHelper.AddParameterToUrl(returnUrl, "nodeid", NodeID.ToString());
            returnUrl = URLHelper.AddParameterToUrl(returnUrl, "documentid", DocumentID.ToString());
            returnUrl = URLHelper.AddParameterToUrl(returnUrl, "productid", HTMLHelper.HTMLEncode(QueryHelper.GetString("productid", string.Empty)));
            returnUrl = URLHelper.AddParameterToUrl(returnUrl, "dialog", QueryHelper.GetString("dialog", "0"));
        }
        else
        {
            returnUrl = "~/CMSModules/Ecommerce/Pages/Tools/ProductOptions/OptionCategory_List.aspx";
        }

        return(returnUrl);
    }
Esempio n. 19
0
    /// <summary>
    /// Creates breadcrumbs.
    /// </summary>
    private void InitBreadcrumbs()
    {
        string url = UIContextHelper.GetElementUrl("CMS.ABTest", "ABTestListing", false);

        if (NodeID > 0)
        {
            url = URLHelper.AddParameterToUrl(url, "NodeID", NodeID.ToString());
        }

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = GetString("abtesting.abtest.list"),
            RedirectUrl = ResolveUrl(url)
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text = GetString("abtesting.abtest.new")
        });
    }
        private void ExtractActiveAlarms(QueryResult response, IEnumerable <AlarmRecord> expected, SystemInterface systemInterface)
        {
            if (response == QueryResult.Valid)
            {
                var alarm = expected.GetEnumerator();

                while (alarm.MoveNext())
                {
                    var      nodeDefinition = systemInterface.SystemInfo.NodeFromID(alarm.Current.NodeID);
                    NodeType nodeType       = nodeDefinition.Type;

                    if (nodeType.ID != Symbol.Intern("CompanyType") &&
                        nodeType.ID != Symbol.Intern("RegionType") &&
                        nodeType.ID != Symbol.Intern("SubstationType"))
                    {
                        if (alarm.Current.IsSet)
                        {
                            NodeID nodeIDRaw       = alarm.Current.NodeID;
                            string nodeLogicalName = systemInterface.SystemInfo.NodeFromID(nodeIDRaw).ToString();

                            string nodeID = nodeIDRaw.ToString();
                            nodeID = nodeID.Remove(0, 9);
                            char[] charsToRemove = { ':', ')', '.' };
                            nodeID = nodeID.Trim(charsToRemove);

                            nodeLogicalName = nodeLogicalName.Substring(nodeLogicalName.LastIndexOf("."));
                            nodeLogicalName = nodeLogicalName.Remove(nodeLogicalName.IndexOf(" ") + 1);
                            nodeLogicalName = nodeLogicalName.Trim(charsToRemove);

                            allActiveAlarms.Add(new Alarms()
                            {
                                NodeID    = nodeID,
                                NodeName  = nodeLogicalName,
                                AlarmType = "",
                                Timestamp = alarm.Current.TimeStamp
                            });
                        }
                    }
                }
            }
        }
Esempio n. 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SetWhereCondition();

        if (!ShowPageColumn)
        {
            HideGridColumns(new[]
            {
                "MVTestPage"
            });
        }

        string url = UIContextHelper.GetElementUrl("CMS.MVTest", "Detail");

        url = URLHelper.AddParameterToUrl(url, "objectid", "{0}");
        url = URLHelper.AddParameterToUrl(url, "aliasPath", AliasPath);
        if (NodeID > 0)
        {
            url = URLHelper.AddParameterToUrl(url, "NodeID", NodeID.ToString());
        }

        gridElem.EditActionUrl = url;
    }
Esempio n. 22
0
        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtITEMNAME.Text))
                {
                    return;
                }
                if (Tool.GetByteLength(txtITEMNAME.Text) > 200)
                {
                    MyMessageBox.Show("备注最大字符长度为200,请重新输入。", "提示", MyMessageBoxButtons.Ok, DrectSoft.Common.Ctrs.DLG.MessageBoxIcon.WarningIcon);
                    return;
                }
                string m_title; //string m_content;
                string m_node;
                string m_parentnode;

                PatRecUtil prUtil = new PatRecUtil(m_App, m_App.CurrentPatientInfo);
                if (m_EditState != EditState.Edit)
                {///新增
                    prUtil.InsertParentNode(DiagID, NodeID.ToString(), ParentNodeID.ToString(), DS_Common.FilterSpecialCharacter(this.txtITEMNAME.Text), string.Empty, string.Empty, "1", out m_node, out m_parentnode);
                    SetTitleContent(out m_title);
                    SetNodeAndPNode(m_node, m_parentnode);
                }
                else
                {///编辑
                    prUtil.UpdateParentNode(DiagID, NodeID, ParentNodeID, DS_Common.FilterSpecialCharacter(this.txtITEMNAME.Text), string.Empty);
                    Title = this.txtITEMNAME.Text;
                }
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Esempio n. 23
0
 public override string ToString()
 {
     return(AreaID.ToString() + ", " + NodeID.ToString() + ", " + JunctionID.ToString());
 }
Esempio n. 24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (function.isAjax())
        {
            string action = Request["action"];
            string value  = Request["value"].Trim();
            string result = "";
            switch (action)
            {
            case "duptitle":
                DataTable dt = contentBll.GetByDupTitle(value);
                result = Newtonsoft.Json.JsonConvert.SerializeObject(dt);
                break;
            }
            Response.Write(result); Response.Flush(); Response.End();
        }
        DataSet ds = new DataSet();

        if (ModelID > 0 && NodeID > 0)
        {
            ds            = mfieldBll.GetProModelFieldS(ModelID.ToString());
            bt_txt.Text   = GetAlias("Title", ds.Tables[0]);
            hits_txt.Text = GetAlias("Hits", ds.Tables[0]);
            gjz_txt.Text  = GetAlias("Tagkey", ds.Tables[0]);
            tj_txt.Text   = GetAlias("EliteLevel", ds.Tables[0]);
            zht_txt.Text  = GetAlias("Status", ds.Tables[0]);
            gx_time.Text  = GetAlias("UpDateTime", ds.Tables[0]);
            Label4.Text   = GetAlias("Subtitle", ds.Tables[0]);
            py.Text       = GetAlias("PYtitle", ds.Tables[0]);
            if (spbll.GetSpecList().Rows.Count > 0)
            {
                SpecInfo_Li.Text = "<button type='button' class='btn btn-primary' onclick='ShowSpDiag()'>添加至专题</button>";
            }
            else
            {
                SpecInfo_Li.Text = "<div style='margin:5px;' class='btn btn-default disabled'><span class='glyphicon glyphicon-info-sign'></span> 尚未定义专题</div>";
            }
            if (!IsPostBack)
            {
                B_ARoleAuth.CheckEx(ZLEnum.Auth.content, "ContentMange");
                if (!string.IsNullOrEmpty(Request.QueryString["Source"]))
                {
                    function.Script(this, "SetContent();");
                }
                //-----工作流,检测该节点是否绑定工作流,如无绑定,则直接通过,未绑定,则以第一步为准
                contentsk.Visible = B_ARoleAuth.Check(ZLEnum.Auth.content, "ContentMange");
                DataTable ddlDT = proBll.SelByNodeID2(NodeID);
                ddlFlow.DataSource     = ddlDT;
                ddlFlow.DataTextField  = "PName";
                ddlFlow.DataValueField = "PPassCode";
                ddlFlow.DataBind();
                B_Admin     AdminBll = new B_Admin();
                M_AdminInfo adminMod = adminBll.GetAdminLogin();
                ddlFlow.SelectedValue = adminMod.DefaultStart.ToString();
                //if (ddlDT.TableName.Equals("Default"))
                //{
                //    ddlFlow.SelectedValue = "99";
                //}
                //else
                //{
                //    ddlFlow.Items[0].Selected = true;
                //}
                //-----
                nodeMod = nodeBll.GetNodeXML(NodeID);
                NodeDir = nodeMod.NodeDir;
                if (nodeMod.ListPageHtmlEx < 3)
                {
                    CreateHTML.Visible = true;
                }
                else
                {
                    CreateHTML.Visible = false;
                }
                #region 节点权限
                adminMod = adminBll.GetAdminLogin();
                if (!("," + adminMod.RoleList + ",").Contains(",1,") && adminMod.NodeRole != 0)
                {
                    DataTable dt = roleBll.SelectNodeRoleName(adminMod.NodeRole);
                    if (dt.Rows.Count > 0)
                    {
                        IList <string[]> liss = new List <string[]>();
                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            string[] nodeM = new string[2];
                            nodeM[0] = dt.Rows[i]["nodeid"].ToString();
                            nodeM[1] = dt.Rows[i]["Columns"].ToString();
                            liss.Add(nodeM);
                        }
                        string bb = nodeBll.stringTreeNodeRole(0, "", liss);
                        if (checknode(bb, NodeID))
                        {
                            if (!GetRole("addTo"))
                            {
                                function.WriteErrMsg("你无权限添加信息", "ContentManage.aspx?NodeID=" + NodeID.ToString());
                            }
                        }
                        else
                        {
                            function.WriteErrMsg("你无权限添加信息", "ContentManage.aspx?NodeID=" + NodeID.ToString());
                        }
                    }
                }
                #endregion
                nodeMod = nodeBll.GetNodeXML(NodeID);
                //CheckNode(nodeMod);
                if (nodeMod.Contribute != 1)
                {
                    function.Script(this, "ShowSys();");
                }
                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='ContentManage.aspx'>内容管理</a></li><li><a href='ContentManage.aspx?NodeID=" + nodeMod.NodeID + "'>" + nodeMod.NodeName + "</a></li><li class='active'>添加内容</li><div class='pull-right hidden-xs'><span><a href='" + customPath2 + "Content/SchedTask.aspx' title='查看计划任务'><span class='glyphicon glyphicon-time' style='color:#28b462;'></span></a>" + GetOpenView() + "<span onclick=\"ShowDiag('EditNode.aspx?NodeID=" + NodeID + "','配置本节点');\" class='glyphicon glyphicon-cog' title='配置本节点' style='cursor:pointer;margin-left:5px;'></span></span></div>");
                //Label2.Text = "<a href='ContentManage.aspx?Nodeid=" + nodeMod.NodeID + "'>" + nodeMod.NodeName + "</a>";
                nodename.Value = nodeMod.NodeName;
                //txtNode.Text = nodeMod.NodeName;
                //hfNode.Value = NodeID + ",";
                M_ModelInfo model = modelBll.GetModelById(ModelID);
                Label1.Text     = "添加" + model.ItemName;
                EBtnSubmit.Text = "添加" + model.ItemName;
                Title_L.Text    = "添加" + model.ItemName;
                ModelHtml.Text  = mfieldBll.GetInputallHtml(ModelID, NodeID);
                txtAddTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                txtdate.Text    = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                BindTempList();
            }
        }
        else
        {
            function.WriteErrMsg("参数错误!!");
        }
    }
Esempio n. 25
0
    /// <summary>
    /// Returns parameters according to the upload mode.
    /// </summary>
    private string GetModeParameters()
    {
        string[] args = null;

        if (MediaLibraryID > 0)
        {
            // MediaLibrary mode
            args = new string[] {
                "MediaLibraryID", MediaLibraryID.ToString(),
                "MediaFolderPath", HttpUtility.UrlEncode(MediaFolderPath),
                "MediaFileID", MediaFileID.ToString(),
                "IsMediaThumbnail", IsMediaThumbnail.ToString(),
                "MediaFileName", HttpUtility.UrlEncode(MediaFileName)
            };

            return("MediaLibraryArgs=" + GetArgumentsString(args));
        }
        else
        {
            if ((NodeID > 0) && (SourceType == MediaSourceEnum.Content))
            {
                // CMS.File mode
                args = new string[] {
                    "NodeID", NodeID.ToString(),
                    "DocumentCulture", DocumentCulture,
                    "IncludeExtension", IncludeExtension.ToString(),
                    "NodeGroupID", NodeGroupID.ToString()
                };

                return("FileArgs=" + GetArgumentsString(args));
            }
            else
            {
                if (ObjectID > 0)
                {
                    // MetaFile mode
                    args = new string[] {
                        "MetaFileID", MetaFileID.ToString(),
                        "ObjectID", ObjectID.ToString(),
                        "SiteID", SiteID.ToString(),
                        "ObjectType", ObjectType,
                        "Category", Category
                    };

                    return("MetaFileArgs=" + GetArgumentsString(args));
                }
                else
                {
                    if (PostForumID > 0)
                    {
                        // Forum attachment
                        args = new string[] {
                            "PostForumID", PostForumID.ToString(),
                            "PostID", PostID.ToString()
                        };

                        return("ForumArgs=" + GetArgumentsString(args));
                    }
                    else
                    {
                        if ((DocumentID > 0) || (FormGUID != Guid.Empty))
                        {
                            // Attachment mode
                            args = new string[] {
                                "DocumentID", DocumentID.ToString(),
                                "DocumentParentNodeID", DocumentParentNodeID.ToString(),
                                "NodeClassName", NodeClassName,
                                "AttachmentGUIDColumnName", AttachmentGUIDColumnName,
                                "AttachmentGUID", AttachmentGUID.ToString(),
                                "AttachmentGroupGUID", AttachmentGroupGUID.ToString(),
                                "FormGUID", FormGUID.ToString(),
                                "IsFieldAttachment", mIsFiledAttachment.ToString()
                            };

                            return("AttachmentArgs=" + GetArgumentsString(args));
                        }
                    }
                }
            }
        }
        return(String.Empty);
    }
Esempio n. 26
0
 public override int GetHashCode()
 {
     return((ServiceName?.GetHashCode() ?? 0) + (NodeID?.ToString().GetHashCode() ?? 0));
 }
Esempio n. 27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        B_ARoleAuth.CheckEx(ZLEnum.Auth.model, "NodeEdit");
        if (function.isAjax())
        {
            #region AJAX
            M_Node nodeMod = nodeBll.SelReturnModel(NodeID);
            if (NodeID < 1)
            {
                nodeMod.ParentID = ParentID;
            }
            string action = Request.Form["action"];
            string value  = Request.Form["value"];
            int    result = M_APIResult.Success;
            switch (action)
            {
            case "nodename":
            {
                nodeMod.NodeName = value;
                result           = nodeBll.CheckNodeName(nodeMod)?M_APIResult.Success:M_APIResult.Failed;
            }
            break;

            case "nodedir":
            {
                nodeMod.NodeDir = value;
                result          = nodeBll.CheckNodeDir(nodeMod) ? M_APIResult.Success : M_APIResult.Failed;
            }
            break;
            }
            Response.Write(result); Response.Flush(); Response.End();
            #endregion
        }
        if (!IsPostBack)
        {
            M_AdminInfo adminMod  = B_Admin.GetLogin();
            M_Node      nodeMod   = nodeBll.SelReturnModel(NodeID);
            M_Node      parentMod = nodeBll.SelReturnModel(ParentID > 0 ? ParentID : nodeMod.ParentID);
            LblNodeName.Text = parentMod.NodeName;
            if (NodeID < 1)
            {
                Title_T.Text = "添加节点";
                CDate_T.Text = DateTime.Now.ToString();
                CUser_T.Text = adminMod.AdminName;
                ModelArr    += parentMod.ContentModel;
                function.Script(this, "BindPY();");
            }
            else if (NodeID > 0)
            {
                Title_T.Text        = "修改节点";
                Release_Btn.Visible = true;
                #region 节点信息填充
                if (nodeMod.IsNull)
                {
                    function.WriteErrMsg("指定要编辑的节点不存在");
                }
                //LblNodeName.Text = nodeMod.NodeName;
                //EDHid.Value = nodeMod.Viewinglimit;
                //HdnDepth.Value = nodeMod.Depth.ToString();
                //HdnParentId.Value = nodeMod.ParentID.ToString();
                //HdnOrderID.Value = nodeMod.OrderID.ToString();
                //HdnChild.Value = nodeMod.Child.ToString();
                TxtNodeName.Text        = nodeMod.NodeName;
                TxtNodeDir.Text         = nodeMod.NodeDir;
                TxtNodePicUrl.Text      = nodeMod.NodePic;
                TxtTips.Text            = nodeMod.Tips;
                TxtMetaKeywords.Text    = nodeMod.Meta_Keywords;
                TxtMetaDescription.Text = nodeMod.Meta_Description;
                TxtDescription.Text     = nodeMod.Description;
                //RBLOpenType.SelectedValue = DataConverter.CLng(node.OpenNew).ToString();
                RBLPurviewType.SelectedValue       = nodeMod.PurviewType ? "1" : "0";
                SiteContentAudit_Rad.SelectedValue = nodeMod.SiteContentAudit.ToString();
                RBLCommentType.SelectedValue       = nodeMod.CommentType;
                TxtHitsOfHot.Text = nodeMod.HitsOfHot.ToString();

                TxtTemplate_hid.Value      = nodeMod.ListTemplateFile;
                IndexTemplate_hid.Value    = nodeMod.IndexTemplate;
                LastinfoTemplate_hid.Value = nodeMod.LastinfoTemplate;
                ProposeTemplate_hid.Value  = nodeMod.ProposeTemplate;
                HotinfoTemplate_hid.Value  = nodeMod.HotinfoTemplate;

                ListPageHtmlEx_Rad.SelectedValue = nodeMod.ListPageHtmlEx.ToString();
                ContentFileEx_Rad.SelectedValue  = nodeMod.ContentFileEx.ToString();
                ListPageEx_Rad.SelectedValue     = nodeMod.ListPageEx.ToString();
                LastinfoPageEx_Rad.SelectedValue = nodeMod.LastinfoPageEx.ToString();
                HotinfoPageEx.SelectedValue      = nodeMod.HotinfoPageEx.ToString();
                ProposePageEx.SelectedValue      = nodeMod.ProposePageEx.ToString();
                DDLContentRule.SelectedValue     = nodeMod.ContentPageHtmlRule.ToString();
                RBLPosition.SelectedValue        = nodeMod.HtmlPosition.ToString();
                RBLItemOpenType.SelectedValue    = nodeMod.ItemOpenTypeTrue.ToString();
                RBLOpenType.SelectedValue        = nodeMod.OpenTypeTrue.ToString();
                TxtAddMoney.Text           = nodeMod.AddMoney.ToString();
                TxtAddPoint.Text           = nodeMod.AddPoint.ToString();
                ClickTimeout.SelectedValue = nodeMod.ClickTimeout.ToString();
                txtAddExp.Text             = nodeMod.AddUserExp.ToString();
                txtDeducExp.Text           = nodeMod.DeducUserExp.ToString();
                ConsumeType_Hid.Value      = nodeMod.ConsumeType.ToString();
                CDate_T.Text = nodeMod.CDate.ToString();
                CUser_T.Text = nodeMod.CUName;
                DataTable auitDt = nodeBll.GetNodeAuitDT(nodeMod.Purview);
                //组权限绑定
                GroupAuthDT = psll.SelByNid(NodeID);
                DataTable tinfo = bGll.GetGroupList();
                GroupAuth_EGV.DataSource = tinfo;
                GroupAuth_EGV.DataBind();
                for (int i = 0; i < tinfo.Rows.Count; i++)
                {
                    ViewGroup_Chk.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString()));
                    ViewGroup2_Chk.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString()));
                    input_Chk.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString()));
                }
                //节点权限
                if (auitDt != null && auitDt.Rows.Count > 0)
                {
                    DataRow auitdr = auitDt.Rows[0];
                    SelCheck_RadioList.SelectedValue = auitdr["View"].ToString();
                    string ViewGroup    = auitdr["ViewGroup"].ToString();
                    string ViewSunGroup = auitdr["ViewSunGroup"].ToString();
                    string input        = auitdr["input"].ToString();
                    string forum        = auitdr["forum"].ToString();
                    foreach (ListItem item in ViewGroup_Chk.Items)
                    {
                        if (("," + ViewGroup + ",").Contains("," + item.Value + ","))
                        {
                            item.Selected = true;
                        }
                    }
                    foreach (ListItem item in ViewGroup2_Chk.Items)
                    {
                        if (("," + ViewSunGroup + ",").Contains("," + item.Value + ","))
                        {
                            item.Selected = true;
                        }
                    }
                    foreach (ListItem item in input_Chk.Items)
                    {
                        if (("," + input + ",").Contains("," + item.Value + ","))
                        {
                            item.Selected = true;
                        }
                    }
                    foreach (ListItem item in forum_Chk.Items)
                    {
                        if (("," + forum + ",").Contains("," + item.Value + ","))
                        {
                            item.Selected = true;
                        }
                    }
                }
                TxtConsumeCount.Text = nodeMod.ConsumeCount.ToString();
                TxtConsumePoint.Text = nodeMod.ConsumePoint.ToString();
                TxtConsumeTime.Text  = nodeMod.ConsumeTime.ToString();
                TxtShares.Text       = nodeMod.Shares.ToString();
                SetCustom(nodeMod.Custom);
                ModelArr            = nodeMod.ContentModel;
                isSimple_CH.Checked = nodeMod.Contribute == 1;
                SafeGuard.Checked   = nodeMod.SafeGuard == 1 ? true : false;
                #endregion
            }
            //添加工作流
            ddlState.DataSource     = bf.GetFlowAll();
            ddlState.DataTextField  = "flowName";
            ddlState.DataValueField = "id";
            ddlState.DataBind();
            ddlState.Items.Insert(0, new ListItem("不指定", "0"));
            droMod = droBll.SelByNodeID(NodeID);
            ddlState.SelectedValue = droMod == null ? "0" : droMod.FID.ToString();
            BGroup.DataSource      = bGll.GetGroupList();
            BGroup.DataBind();
            //内容模型列表
            DataTable dt = bllmodel.GetList();
            Model_RPT.DataSource = dt;
            Model_RPT.DataBind();
            //角色列表
            DataTable Rt = B_Role.SelectNodeRoleNode(NodeID);
            AdminRole_EGV.DataSource = Rt;
            AdminRole_EGV.DataBind();

            #region 互动
            DataTable dp = pll.GetPubModelPublic();
            DropDownList1.DataSource     = dp;
            DropDownList1.DataTextField  = "PubName";
            DropDownList1.DataValueField = "Pubid";
            DropDownList1.DataBind();
            DropDownList1.Items.Insert(0, new ListItem("选择绑定", "0"));
            M_Pub pp = pll.GetSelectNode(NodeID.ToString());
            if (pp.Pubid > 0)
            {
                DropDownList1.SelectedValue = pp.Pubid.ToString();
            }
            #endregion
            string bread = "<li><a href='" + customPath2 + "Config/SiteInfo.aspx'>系统设置</a></li><li><a href='NodeManage.aspx'>节点管理</a></li>";
            bread += "<li class='active'><a href='" + Request.RawUrl + "'>" + Title_T.Text + "</a></li>";
            bread += Call.GetHelp(103);
            bread += "<div class='pull-right' style='margin-right:10px;'><a href='" + Request.RawUrl + "' title='刷新'><i class='fa fa-refresh'></i></a></div>";
            Call.SetBreadCrumb(Master, bread);
        }
    }
Esempio n. 28
0
    protected void EBtnSubmit_Click(object sender, EventArgs e)
    {
        M_Node node = new M_Node();

        if (NodeID > 0)
        {
            node = nodeBll.SelReturnModel(NodeID);
        }
        else
        {
            node.ParentID = ParentID;
        }
        node.NodeDir  = TxtNodeDir.Text;
        node.NodeName = TxtNodeName.Text;
        if (!nodeBll.CheckCanSave(node))
        {
            function.WriteErrMsg("节发现同栏目下栏目名或标识名重复,请点击确定重新修改节点");
        }
        #region 修改
        //node.Viewinglimit = EDHid.Value.TrimEnd('|');
        node.NodeType         = 1;
        node.NodePic          = TxtNodePicUrl.Text;
        node.NodeUrl          = "";
        node.NodeListUrl      = "";
        node.Tips             = TxtTips.Text;
        node.Description      = TxtDescription.Text;
        node.Meta_Keywords    = TxtMetaKeywords.Text;
        node.Meta_Description = TxtMetaDescription.Text;
        node.OpenNew          = DataConverter.CBool(RBLOpenType.SelectedValue);
        node.ItemOpenType     = DataConverter.CBool(RBLItemOpenType.SelectedValue);
        node.PurviewType      = DataConverter.CBool(RBLPurviewType.SelectedValue);
        node.CommentType      = RBLCommentType.SelectedValue;
        node.HitsOfHot        = DataConverter.CLng(TxtHitsOfHot.Text);
        node.ListTemplateFile = TxtTemplate_hid.Value;
        node.IndexTemplate    = IndexTemplate_hid.Value;// Request.Form[TxtIndexTemplate.UniqueID];
        node.LastinfoTemplate = LastinfoTemplate_hid.Value;
        node.ProposeTemplate  = ProposeTemplate_hid.Value;
        node.HotinfoTemplate  = HotinfoTemplate_hid.Value;
        node.ConsumePoint     = DataConverter.CLng(TxtConsumePoint.Text);
        node.ConsumeType      = DataConverter.CLng(Page.Request.Form["ConsumeType"]);
        node.ConsumeTime      = DataConverter.CLng(TxtConsumeTime.Text);
        node.ConsumeCount     = DataConverter.CLng(TxtConsumeCount.Text);
        node.Shares           = DataConverter.CFloat(TxtShares.Text);
        node.OpenTypeTrue     = RBLOpenType.SelectedValue;
        node.ItemOpenTypeTrue = RBLItemOpenType.SelectedValue;
        node.Custom           = GetCustom();
        node.SiteConfige      = "";
        node.AddPoint         = DataConverter.CLng(TxtAddPoint.Text);
        node.AddMoney         = DataConverter.CDouble(TxtAddMoney.Text);
        node.ClickTimeout     = DataConverter.CLng(ClickTimeout.SelectedValue);
        node.AddUserExp       = DataConverter.CLng(txtAddExp.Text);
        node.DeducUserExp     = DataConverter.CLng(txtDeducExp.Text);
        node.CDate            = DataConverter.CDate(CDate_T.Text);
        node.CUser            = badmin.GetAdminLogin().AdminId;
        node.CUName           = CUser_T.Text;
        node.ContentModel     = (Request.Form["ChkModel"] ?? "");
        string        modellist       = node.ContentModel;
        Int32         Nodetype        = 0;
        StringBuilder NodeListTypeall = new StringBuilder();
        NodeListTypeall.Append("");

        DataTable dt = bllmodel.GetModels(node.ContentModel);
        if (dt != null)
        {
            foreach (DataRow dr in dt.Rows)
            {
                NodeListTypeall.Append("," + dr["ModelType"]);
            }
        }
        NodeListTypeall.Append(",");
        if (Convert.ToInt32(NodeListTypeall.ToString().IndexOf(",1,")) > -1 && Convert.ToInt32(NodeListTypeall.ToString().IndexOf(",2,")) > -1)
        {
            Nodetype = 3;
        }
        else if (Convert.ToInt32(NodeListTypeall.ToString().IndexOf(",2,")) > -1 && Convert.ToInt32(NodeListTypeall.ToString().IndexOf(",1,")) == -1)
        {
            Nodetype = 2;
        }
        else if (Convert.ToInt32(NodeListTypeall.ToString().IndexOf(",1,")) > -1 && Convert.ToInt32(NodeListTypeall.ToString().IndexOf(",2,")) == -1)
        {
            Nodetype = 1;
        }
        if (Convert.ToInt32(NodeListTypeall.ToString().IndexOf(",5,")) > -1)
        {
            Nodetype = 5;
        }
        //---------------------------
        if (DropDownList1.SelectedValue != "0")
        {
            M_Pub pm = pll.GetSelect(DataConverter.CLng(DropDownList1.SelectedValue));
            Nodetype = (pm.Public == 1) ? 7 : 6;
        }
        node.ListPageHtmlEx      = DataConverter.CLng(ListPageHtmlEx_Rad.SelectedValue);
        node.ContentFileEx       = DataConverter.CLng(ContentFileEx_Rad.SelectedValue);
        node.ListPageEx          = DataConverter.CLng(ListPageEx_Rad.SelectedValue);
        node.LastinfoPageEx      = DataConverter.CLng(LastinfoPageEx_Rad.SelectedValue);//LastinfoTemplate.UniqueID
        node.HotinfoPageEx       = DataConverter.CLng(HotinfoPageEx.SelectedValue);
        node.ProposePageEx       = DataConverter.CLng(ProposePageEx.SelectedValue);
        node.ContentPageHtmlRule = DataConverter.CLng(DDLContentRule.SelectedValue);
        node.SafeGuard           = SafeGuard.Checked ? 1 : 0;
        node.HtmlPosition        = DataConverter.CLng(RBLPosition.SelectedValue);
        node.NodeListType        = DataConverter.CLng(Nodetype);
        node.Contribute          = isSimple_CH.Checked ? 1 : 0;
        node.SiteContentAudit    = DataConverter.CLng(SiteContentAudit_Rad.SelectedValue);
        node.AuditNodeList       = "";
        DataTable auitdt = nodeBll.GetNodeAuitDT();
        DataRow   auitDr = auitdt.Rows[0];
        auitDr["View"] = SelCheck_RadioList.SelectedValue;
        string ViewGroupvalue = "";
        foreach (ListItem dd in ViewGroup_Chk.Items)
        {
            if (dd.Selected)
            {
                if (ViewGroupvalue != "")
                {
                    ViewGroupvalue += ",";
                }
                ViewGroupvalue += dd.Value;
            }
        }
        auitDr["ViewGroup"] = ViewGroupvalue;
        string ViewGroup2value = "";
        foreach (ListItem dd in ViewGroup2_Chk.Items)
        {
            if (dd.Selected)
            {
                if (ViewGroup2value != "")
                {
                    ViewGroup2value += ",";
                }
                ViewGroup2value += dd.Value;
            }
        }
        auitDr["ViewSunGroup"] = ViewGroup2value;
        string ViewGroup3value = "";
        foreach (ListItem dd in input_Chk.Items)
        {
            if (dd.Selected)
            {
                if (ViewGroup3value != "")
                {
                    ViewGroup3value += ",";
                }
                ViewGroup3value += dd.Value;
            }
        }
        auitDr["input"] = ViewGroup3value;
        string forumvalue = "";
        foreach (ListItem dd in forum_Chk.Items)
        {
            if (dd.Selected)
            {
                if (forumvalue != "")
                {
                    forumvalue += ",";
                }
                forumvalue += dd.Value;
            }
        }
        auitDr["forum"] = forumvalue;
        node.Purview    = JsonConvert.SerializeObject(auitdt);
        if (NodeID > 0)
        {
            nodeBll.UpdateByID(node);
        }
        else
        {
            nodeBll.Insert(node);
        }
        //----------ZL_Node_Template
        string[] ModelArr = modellist.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
        nodeBll.DelModelTemplate(node.NodeID, modellist);
        for (int i = 0; i < ModelArr.Length; i++)
        {
            if (!string.IsNullOrEmpty(Page.Request.Form["ModelTemplate_" + ModelArr[i]].Trim()))
            {
                //将模型模板设定写入数据库
                string temp = Page.Request.Form["ModelTemplate_" + ModelArr[i]].Trim();
                if (nodeBll.IsExistTemplate(node.NodeID, DataConverter.CLng(ModelArr[i])))
                {
                    nodeBll.UpdateModelTemplate(node.NodeID, DataConverter.CLng(ModelArr[i]), temp);
                }
                else
                {
                    nodeBll.AddModelTemplate(node.NodeID, DataConverter.CLng(ModelArr[i]), temp);
                }
            }
        }
        //--工作流
        droMod = droBll.SelByNodeID(NodeID);
        if (droMod == null)//添加
        {
            droMod        = new M_NodeBindDroit();
            droMod.NodeId = NodeID;
            droMod.FID    = DataConverter.CLng(ddlState.SelectedValue);
            droBll.AddNodeBinDroit(droMod);
        }
        else
        {
            droMod.FID = DataConverter.CLng(ddlState.SelectedValue);
            droBll.UpdateByID(droMod);
        }
        for (int i = 0; i <= AdminRole_EGV.Rows.Count - 1; i++)
        {
            GridViewRow row   = AdminRole_EGV.Rows[i];
            CheckBox    cbox1 = (CheckBox)row.FindControl("chkSel1");
            CheckBox    cbox2 = (CheckBox)row.FindControl("chkSel2");
            CheckBox    cbox3 = (CheckBox)row.FindControl("chkSel3");
            CheckBox    cbox4 = (CheckBox)row.FindControl("chkSel4");
            CheckBox    cbox5 = (CheckBox)row.FindControl("chkSel5");
            CheckBox    cbox6 = (CheckBox)row.FindControl("chkSel6");
            HiddenField hd    = (HiddenField)row.FindControl("HiddenRID");

            M_NodeRole nr = bnll.SelModelByRidAndNid(NodeID, Convert.ToInt32(hd.Value));
            if (nr == null)
            {
                nr = new M_NodeRole(); nr.NID = NodeID; nr.RID = Convert.ToInt32(hd.Value);
            }
            nr.look     = cbox1.Checked ? 1 : 0;
            nr.addTo    = cbox2.Checked ? 1 : 0;
            nr.State    = cbox3.Checked ? 1 : 0;
            nr.Modify   = cbox4.Checked ? 1 : 0;
            nr.Columns  = cbox5.Checked ? 1 : 0;
            nr.Comments = cbox6.Checked ? 1 : 0;
            bnll.InsertUpdate(nr);
        }

        if (DropDownList1.SelectedValue != "0")
        {
            M_Pub pm = pll.GetSelect(DataConverter.CLng(DropDownList1.SelectedValue));
            if (!("," + pm.PubNodeID + ",").Contains("," + NodeID + ","))//判断互动模型是否绑定该节点
            {
                string[]      strarr = pm.PubNodeID.Split(',');
                StringBuilder sb     = new StringBuilder();
                for (int x = 0; x < strarr.Length; x++)
                {
                    StringHelper.AppendString(sb, strarr[x]);
                }
                StringHelper.AppendString(sb, NodeID.ToString());
                pm.PubNodeID = sb.ToString();
            }
            pll.GetUpdate(pm);
        }
        else
        {
            M_Pub pp = pll.GetSelectNode(NodeID.ToString());
            if (pp.Pubid > 0)
            {
                string[]      strarr = pp.PubNodeID.Split(',');
                StringBuilder sb     = new StringBuilder();
                for (int x = 0; x < strarr.Length; x++)
                {
                    if (!strarr[x].Equals(NodeID.ToString()))
                    {
                        StringHelper.AppendString(sb, strarr[x]);
                    }
                }
                pp.PubNodeID = sb.ToString();
                pll.GetUpdate(pp);
            }
        }

        for (int i = 0; i <= GroupAuth_EGV.Rows.Count - 1; i++)
        {
            CheckBox         cbox1 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel1");
            CheckBox         cbox2 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel2");
            CheckBox         cbox3 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel3");
            CheckBox         cbox4 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel4");
            CheckBox         cbox5 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel5");
            CheckBox         cbox6 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel6");
            CheckBox         cbox7 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel11");
            CheckBox         cbox8 = (CheckBox)GroupAuth_EGV.Rows[i].FindControl("chkSel12");
            M_UserPromotions ups   = new M_UserPromotions();
            ups.GroupID = Convert.ToInt32(GroupAuth_EGV.DataKeys[i].Value);
            if (cbox1.Checked)
            {
                ups.look = 1;
            }
            else
            {
                ups.look = 0;
            }

            if (cbox2.Checked)
            {
                ups.addTo = 1;
            }
            else
            {
                ups.addTo = 0;
            }

            if (cbox3.Checked)
            {
                ups.Modify = 1;
            }
            else
            {
                ups.Modify = 0;
            }

            if (cbox4.Checked)
            {
                ups.Deleted = 1;
            }
            else
            {
                ups.Deleted = 0;
            }

            if (cbox5.Checked)
            {
                ups.Columns = 1;
            }
            else
            {
                ups.Columns = 0;
            }

            if (cbox6.Checked)
            {
                ups.Comments = 1;
            }
            else
            {
                ups.Comments = 0;
            }

            if (cbox7.Checked)
            {
                ups.Down = 1;
            }
            else
            {
                ups.Down = 0;
            }

            if (cbox8.Checked)
            {
                ups.quote = 1;
            }
            else
            {
                ups.quote = 0;
            }

            ups.NodeID = NodeID;
            IsChild(ups);
            psll.GetInsertOrUpdate(ups);
        }
        #endregion
        function.WriteSuccessMsg("操作成功", "NodeManage.aspx");
    }
Esempio n. 29
0
 public override string ToString()
 {
     //return AreaID.ToString() + "." + NodeID.ToString();
     return(StreetName.ToString() + ", " + Position.X.ToString() + ", " + Position.Y.ToString() + ", " + Position.Z.ToString() + ", " + NodeID.ToString());
 }
Esempio n. 30
0
 public override string ToString()
 {
     return(AreaID.ToString() + ", " + NodeID.ToString() + ", " + Flags0.Value.ToString() + ", " + Flags1.Value.ToString() + ", " + Flags2.Value.ToString() + ", " + LinkLength.Value.ToString());
 }