示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int id = GetIntKey("iD");

        if (id > 0)
        {
            News condition = new News();
            condition.ID = id;
            News news = TableOperate <News> .GetRowData(condition);

            if (news.ID > 0 && news.FileType != 2)
            {
                Result result = new Result();
                string file   = news.Files;
                if (news.FileType == 4)//图片下载
                {
                    file = news.Files1;
                }
                Down(news.Title, "/UploadFiles/" + file);
            }
            else
            {
                Result result = new Result();
                result.isOk          = true;
                result.msg           = "网页不支持下载请点击浏览!";
                Response.ContentType = "text/json";
                Response.Write(new JavaScriptSerializer().Serialize(result));
                Response.End();
            }
        }
    }
示例#2
0
    protected News GetShare(int ID)
    {
        News condition = new News();

        condition.ID = ID;
        return(TableOperate <News> .GetRowData(condition));
    }
示例#3
0
    private void AddStopTime(int time, int GateWayID)
    {
        UserVistCount condition = new UserVistCount();

        condition.ID = 1;
        UserVistCount user = TableOperate <UserVistCount> .GetRowData(condition);

        if (user.ID > 0)
        {
            condition.StopTime = user.StopTime + time;
            condition.ID       = 1;
            TableOperate <UserVistCount> .Update(condition);
        }
        IBeaconGateWay condition1 = new IBeaconGateWay();//增加展区停留时间

        condition1.ID = GateWayID;
        IBeaconGateWay ibecont = TableOperate <IBeaconGateWay> .GetRowData(condition1);

        if (ibecont.ID > 0)
        {
            condition1    = new IBeaconGateWay();
            condition1.Y  = ibecont.Y + 1;
            condition1.ID = ibecont.ID;
            TableOperate <IBeaconGateWay> .Update(condition1);
        }
    }
示例#4
0
    public static GlobalConfig GetWebStates()
    {
        GlobalConfig config = new GlobalConfig();

        config.ID = 1;
        return(TableOperate <GlobalConfig> .GetRowData(config));
    }
示例#5
0
    public static QuestionType GetChannelByID(int id)
    {
        QuestionType conditon = new QuestionType();

        conditon.ID = id;
        return(TableOperate <QuestionType> .GetRowData(conditon));
    }
示例#6
0
    public static Boolean VerifyPwd(int id)
    {
        Admin_User valueTable = new Admin_User();

        Admin_User conditionTable = new Admin_User();

        conditionTable.ID     = id;
        conditionTable.States = 1;
        Admin_User admin = TableOperate <Admin_User> .GetRowData(valueTable, conditionTable);

        if (!admin.IsNull)
        {
            //page.s
            HttpContext.Current.Session["adminName"] = admin.Name;
            if (admin.HeadPic != null && admin.HeadPic != "")
            {
                HttpContext.Current.Session["headpic"] = SysConfig.headpicfile + admin.HeadPic;
            }
            HttpContext.Current.Session["adminFullName"] = admin.FullName;
            HttpContext.Current.Session["adminLevel"]    = admin.UserLevel;
            HttpContext.Current.Session["ExhibitionID"]  = admin.ExhibitionID;
            HttpContext.Current.Session["adminID"]       = admin.ID;


            string[] arrManage = admin.Manage.Split(',');
            HttpContext.Current.Session["adminManage"] = arrManage;
            HttpContext.Current.Session.Timeout        = 60;
            UpdateLoginDate(admin.ID); //更新最后登录时间
            //CookieUserID = admin.ID;
            string check = admin.ID + "|" + AdminJiaMi(admin.ID, admin.Pass, HttpContext.Current.Request.UserHostName, HttpContext.Current.Request.UserHostAddress);
            CookieUserCheck = check;
            return(true);
        }
        return(false);
    }
示例#7
0
    public static Exhibition GetChannelByID(int id)
    {
        Exhibition conditon = new Exhibition();

        conditon.ID = id;
        return(TableOperate <Exhibition> .GetRowData(conditon));
    }
示例#8
0
    protected int GetAllCount(int ID)
    {
        ReserveDate condition = new ReserveDate();

        condition.ID = ID;
        return(TableOperate <ReserveDate> .GetRowData(condition).Count);
    }
示例#9
0
    /// <summary>
    /// 添加栏目
    /// </summary>
    public static int Insert(TagTree channel)
    {
        if (channel.ParentID == 0)
        {
            channel.Depth    = 0;
            channel.ParentID = 0;
            channel.Path     = "0~";
            channel.NamePath = "所有栏目~";
            channel.AddInsert("RootID", "IDENT_CURRENT('TagTree')");
        }
        else
        {
            TagTree condition = new TagTree();
            condition.ID = channel.ParentID;
            TagTree parentChannel = TableOperate <TagTree> .GetRowData(condition);

            string path     = Convert.ToString(parentChannel.Path) + channel.ParentID + "~";
            string namePath = Convert.ToString(parentChannel.NamePath) + Convert.ToString(parentChannel.Name) + "~";
            channel.Depth    = parentChannel.Depth + 1;
            channel.Path     = path;
            channel.RootID   = parentChannel.RootID;
            channel.NamePath = namePath;
        }
        return(TableOperate <TagTree> .InsertReturnID(channel));
    }
示例#10
0
    public static TagTree GetChannelByID(int id)
    {
        TagTree conditon = new TagTree();

        conditon.ID = id;
        return(TableOperate <TagTree> .GetRowData(conditon));
    }
示例#11
0
    /// <summary>
    /// 人数统计
    /// </summary>
    private void AddCount()
    {
        UserVistCount condition = new UserVistCount();

        condition.ID = 1;
        UserVistCount user = TableOperate <UserVistCount> .GetRowData(condition);

        if (user.ID > 0)
        {
            if (user.AddTime.Date == DateTime.Now.Date)
            {
                condition.NowDayCount = user.NowDayCount + 1;
            }
            else
            {
                condition.NowDayCount = 1;
            }
            condition.AddTime = DateTime.Now;
            condition.Count   = user.Count + 1;
            condition.ID      = user.ID;
            TableOperate <UserVistCount> .Update(condition);
        }
        else
        {
            condition.AddTime     = DateTime.Now;
            condition.NowDayCount = 1;
            condition.Count       = 1;
            TableOperate <UserVistCount> .Insert(condition);
        }
    }
示例#12
0
    protected int IsIns(string filePath)
    {
        string json = "{\"type\":\"select\", \"file\":\"" + filePath + "\",\"id\":0}";

        json = json.Replace("\\", "/");
        string   url      = string.Format("http://127.0.0.1:5478/?json={0}", HttpUtility.UrlEncode(json));
        string   str      = HttpHelp.Get(url);
        JsonData DataList = JsonMapper.ToObject(str);
        string   state    = DataList["state"].ToString();

        if (state == "true")
        {
            int FaceID = (int)DataList["returnid"];
            if (FaceID > 0)
            {
                Face condition = new Face();
                condition.ID = FaceID;
                Face user = TableOperate <Face> .GetRowData(condition);

                if (user.UserinfoID > 0)
                {
                    return(user.UserinfoID);
                }
            }
        }
        return(0);
    }
示例#13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request["ip"]))
        {
            string IP        = Convert.ToString(Request["ip"]);
            Pclist condition = new Pclist();
            condition.IP = IP;
            Pclist pc = TableOperate <Pclist> .GetRowData(condition);

            if (pc.ID > 0)
            {
                Update(pc);
                if (!string.IsNullOrEmpty(Request["v"]))
                {
                    int version = Convert.ToInt32(Request["v"]);
                    if (pc.Version != version)
                    {
                        Json = "{\"NowVersion\": " + pc.Version + ",\"list\": [";
                        List <News> list = NewsList(pc.ID);
                        for (int i = 0; i < list.Count; i++)
                        {
                            string File = PicSwitch(list[i].Files, list[i].FileType);

                            Json += "{\"Title\": \"" + list[i].Title + "\",\"Id\": " + list[i].ID + ",\"File\": \"" + File +
                                    "\",\"Word\": \"" + list[i].PicWord + "\",\"Json\": " + DellNull(list[i].JsonStr) + ",\"Tag\": \"" + list[i].ModeID +
                                    "\",\"Isjz\": " + list[i].Isjz + ",\"FileType\": " + list[i].FileType + ",\"Ispingbao\": " + list[i].IsPingBao + "},";
                        }
                        Json  = Json.Trim(',');
                        Json += "]}";
                    }
                }
            }
        }
        Response.Write(Json.Replace(" ", ""));
    }
示例#14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string action = GetstringKey("action");

        if (action != "save")
        {
            if (!string.IsNullOrEmpty(this.Request["iD"]))
            {
                int     _iD       = Convert.ToInt32(this.Request["iD"]);
                IPWhite condition = new IPWhite();
                condition.ID = _iD;
                news         = TableOperate <IPWhite> .GetRowData(condition);

                iD.Value = Convert.ToString(news.ID);
            }
            states.Value = news.States + "";
            DataBind();
        }
        else
        {
            Result  result         = new Result();
            string  logbrief       = "";
            IPWhite newChannelNews = new IPWhite();
            newChannelNews.ID = 0;
            newChannelNews.AutoForm(this.Page);
            string title = newChannelNews.IP;
            int    _iD;
            if (!string.IsNullOrEmpty(this.Request["iD"]))
            {
                _iD = Convert.ToInt32(this.Request["iD"]);
                TableOperate <IPWhite> .Update(newChannelNews);

                result.msg = "编辑成功,等待返回列表";
                logbrief   = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "编辑了为【" + title + "】的白名单";
            }
            else
            {
                newChannelNews.AddTime = DateTime.Now;
                newChannelNews.AddID   = AdminMethod.AdminID;
                _iD = TableOperate <IPWhite> .InsertReturnID(newChannelNews);

                result.msg = "添加成功,等待返回列表";
                logbrief   = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "添加了为【" + title + "】的白名单";
            }

            if (_iD > 0)
            {
                result.isOk = true;
                Lognet.AddLogin(logbrief);
            }
            else
            {
                result.msg = "操作失败";
            }
            Response.ContentType = "text/json";
            Response.Write(new JavaScriptSerializer().Serialize(result));
            Response.End();
        }
        DataBind();
    }
示例#15
0
    private void GetParam(HttpContext context)
    {
        HttpRequest requset = context.Request;
        var         ID      = int.Parse(requset["ID"]);
        var         X       = double.Parse(requset["X"]);
        var         Y       = double.Parse(requset["Y"]);

        View_Light view_Light = new View_Light();
        View_Light V          = new View_Light();

        V.ID          = ID;
        view_Light.ID = ID;
        view_Light.X  = X;
        view_Light.Y  = Y;
        View_Light hot = TableOperate <View_Light> .GetRowData(V);//查询是否存在

        if (hot.ID > 0)
        {
            int mes = TableOperate <View_Light> .Update(view_Light);

            if (mes > 0)
            {
                Response.Write("\"errcode\":\"0\",\"msg\":\"ok\"");
            }
            else
            {
                Response.Write("\"errcode\":\"1\",\"msg\":\"false\"");
            }
        }
    }
示例#16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        m_ExhibitionList = TagProvider.SelectAll();
        string action = GetstringKey("action");

        if (action != "save")
        {
            if (!string.IsNullOrEmpty(this.Request["iD"]))
            {
                int     _iD       = Convert.ToInt32(this.Request["iD"]);
                TagTree condition = new TagTree();
                condition.ID = _iD;
                news         = TableOperate <TagTree> .GetRowData(condition);

                m_nowChild = Convert.ToString(news.Child).ToLower();
                iD.Value   = Convert.ToString(news.ID);
            }
            DataBind();
        }
        else
        {
            Result  result         = new Result();
            string  logbrief       = "";
            TagTree newChannelNews = new TagTree();
            newChannelNews.ID = 0;
            newChannelNews.AutoForm(this.Page);
            string Title = newChannelNews.Name;
            int    _iD;
            if (!string.IsNullOrEmpty(this.Request["iD"]))
            {
                _iD = Convert.ToInt32(this.Request["iD"]);
                TagProvider.Update(newChannelNews);
                result.msg = "编辑成功,等待返回列表";
                logbrief   = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "编辑了为【" + Title + "】的资源分类";
            }
            else
            {
                newChannelNews.AddTime = DateTime.Now;
                newChannelNews.AddID   = AdminMethod.AdminID;
                _iD        = TagProvider.Insert(newChannelNews);
                result.msg = "添加成功,等待返回列表";
                logbrief   = "管理员:【" + AdminMethod.AdminFullName + "】在" + DateTime.Now.GetDateTimeFormats('f')[0].ToString() + "添加了为【" + Title + "】的资源分类";
            }

            if (_iD > 0)
            {
                result.isOk = true;
                Lognet.AddLogin(logbrief);
            }
            else
            {
                result.msg = "操作失败";
            }
            Response.ContentType = "text/json";
            Response.Write(new JavaScriptSerializer().Serialize(result));
            Response.End();
        }
        DataBind();
    }
示例#17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(this.Request["ip"]))
        {
            string ip      = this.Request["ip"];
            int    version = Convert.ToInt32(this.Request["v"]);//文件版本控制

            Pclist condition = new Pclist();
            condition.IP = ip;
            Pclist channel = TableOperate <Pclist> .GetRowData(condition);

            if ((channel.Version == version || channel.ID == 0))
            {
                Response.Write("false");
                return;
            }
            else
            {
                Response.Write("<?xml version=\"1.0\"?>\r\n<Config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n");

                View_News conditionNews = new View_News();
                View_News vNews         = new View_News();
                conditionNews.PcID  = channel.ID;
                conditionNews.State = 1;
                List <View_News> m_newsList = TableOperate <View_News> .Select(vNews, conditionNews, 0, " order by  OrderID asc ");

                string str = "<FileList>\r\n";

                for (int i = 0; i < m_newsList.Count; i++)
                {
                    string files = m_newsList[i].Files;

                    string item = "<NetFile>\r\n";
                    item += "<ID>" + m_newsList[i].ID + "</ID>\r\n";
                    item += "<Title>" + Del(m_newsList[i].Title) + "</Title>\r\n";
                    item += "<File>" + Del(files) + "</File>\r\n";
                    item += "<Word>" + Del(m_newsList[i].PicWord) + "</Word>\r\n";
                    item += "<Tag>" + m_newsList[i].ModeID + "</Tag>\r\n";
                    item += "<FileType>" + m_newsList[i].FileType + "</FileType>\r\n";
                    item += "<ISrh>false</ISrh>\r\n";
                    item += "<IsJz>false</IsJz>\r\n";
                    item += "<Bejson>" + Del(m_newsList[i].JsonStr) + "</Bejson>\r\n";
                    item += "</NetFile>\r\n";
                    str  += item;
                }
                str += "</FileList>\r\n";

                Response.Write("<NeedUpdate>true</NeedUpdate>\r\n");
                Response.Write("<NowVersion>" + channel.Version + "</NowVersion>\r\n");
                Response.Write(str);
                Response.Write("</Config>");
            }
        }
        else
        {
            Response.Write("false");
        }
    }
示例#18
0
    /// <summary>
    /// 更新主机版本
    /// </summary>
    /// <param name="PCID"></param>
    public static void UpdataVesion(int PCID)
    {
        Pclist newChannel = new Pclist();

        newChannel.ID = PCID;
        Pclist ddd = TableOperate <Pclist> .GetRowData(newChannel);

        newChannel.Version = ddd.Version + 1;
        TableOperate <Pclist> .Update(newChannel);
    }
示例#19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!string.IsNullOrEmpty(Request["act"]))
            {
                string act = Convert.ToString(Request["act"]);
                if (act == "get")
                {
                    Area        v           = new Area();
                    Area        condition   = new Area();
                    List <Area> m_lightList = TableOperate <Area> .Select(v, condition, 0, " order by OrderID asc ");

                    string json = "{\"list\":[";
                    for (int i = 0; i < m_lightList.Count; i++)
                    {
                        json += "{\"id\":" + m_lightList[i].ID + ", \"name\":\"" + m_lightList[i].AreaName + "\", \"Tips\":\"" + m_lightList[i].Brief + "\"},";
                    }
                    json  = json.Trim(',');
                    json += "]}";
                    Response.Write(json);
                }
                else if (act == "edit")
                {
                    int    _ID       = Convert.ToInt32(Request["id"]);
                    string Brief     = Convert.ToString(Request["brief"]);
                    Area   v         = new Area();
                    Area   condition = new Area();
                    condition.ID = _ID;
                    v            = TableOperate <Area> .GetRowData(condition);

                    if (v.ID > 0)
                    {
                        condition.Brief = Brief;
                        condition.ID    = v.ID;
                        TableOperate <Area> .Update(condition);

                        string msg = "{\"state\":\"true\", \"msg\":\"修改成功\"}";
                        Response.Write(msg);
                    }
                    else
                    {
                        string msg = "{\"state\":\"false\", \"msg\":\"ID不存在\"}";
                        Response.Write(msg);
                    }
                }
            }
        }
        catch
        {
            string msg = "{\"state\":\"false\", \"msg\":\"请求异常!\"}";
            Response.Write(msg);
        }
    }
示例#20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(this.Request["iD"]))
     {
         int     _iD       = Convert.ToInt32(this.Request["iD"]);
         AnnNews condition = new AnnNews();
         condition.ID = _iD;
         news         = TableOperate <AnnNews> .GetRowData(condition);
     }
     DataBind();
 }
示例#21
0
    public static ModeChannel GetChannelByID(int id)
    {
        ModeChannel conditon = new ModeChannel();

        conditon.ID = id;
        if (AdminMethod.ExhibitionID != 0)
        {
            conditon.ExhibitionID = AdminMethod.ExhibitionID;
        }
        return(TableOperate <ModeChannel> .GetRowData(conditon));
    }
示例#22
0
    /// <summary>
    /// 获取全局的是否启用白名单
    /// </summary>
    public static void GetConfig()
    {
        GlobalConfig condition = new GlobalConfig();

        condition.ID = 1;
        GlobalConfig global = TableOperate <GlobalConfig> .GetRowData(condition);

        if (global.ID > 0)
        {
            HttpContext.Current.Session["UserIP"] = global.UserIP;
        }
    }
示例#23
0
    private void editDevice(int ID, string X, string Y)
    {
        try
        {
            View_Device condition = new View_Device();
            condition.ID = ID;
            View_Device hot = TableOperate <View_Device> .GetRowData(condition);//查询是否存在

            if (hot.ID > 0)
            {
                if (Request.Params["X"] == null)
                {
                    X = null;
                }
                else
                {
                    X = HttpUtility.UrlDecode(Request.Params["X"]);

                    condition.X = double.Parse(X);
                }
                if (Request.Params["Y"] == null)
                {
                    Y = null;
                }
                else
                {
                    Y = HttpUtility.UrlDecode(Request.Params["Y"]);

                    condition.Y = double.Parse(Y);
                }
                int mes = TableOperate <View_Device> .Update(condition);

                if (mes > 0)
                {
                    Response.Write("\"errcode\":\"0\",\"msg\":\"ok\"");
                }
                else
                {
                    Response.Write("\"errcode\":\"1\",\"msg\":\"false\"");
                }
            }
            else
            {
                Response.Write("\"errcode\":\"1\",\"msg\":\"无效参数\"");
            }
        }
        catch (Exception)
        {
            throw;
        }
        Response.End();
    }
示例#24
0
    protected int GetDcount(int ID)
    {
        IBeaconGateWay condition = new IBeaconGateWay();

        condition.ID = ID;
        IBeaconGateWay way = TableOperate <IBeaconGateWay> .GetRowData(condition);

        if (way.ID > 0)
        {
            return(way.H);
        }
        return(1);
    }
示例#25
0
    private void AddTime(int ZQID, double time)
    {
        FaceHotArea condition = new FaceHotArea();

        condition.ID = ZQID;
        FaceHotArea hot = TableOperate <FaceHotArea> .GetRowData(condition);

        if (hot.ID > 0)
        {
            condition.Time = (hot.Time + time);
            condition.ID   = hot.ID;
            TableOperate <FaceHotArea> .Update(condition);
        }
    }
示例#26
0
    /// <summary>
    /// 删除分享的文件
    /// </summary>
    /// <param name="_ID"></param>
    /// <returns></returns>
    protected int DeleteShare(int _ID)
    {
        News condition = new News();

        condition.OldID  = _ID;
        condition.TypeID = 1;
        News news = TableOperate <News> .GetRowData(condition);

        if (news.ID > 0)
        {
            return(TableOperate <News> .Delete(condition));
        }
        return(0);
    }
示例#27
0
    /// <summary>
    /// 验证用户名,密码
    /// </summary>
    /// <param name="username">用户名</param>
    /// <param name="password">密码</param>
    /// <returns></returns>
    public static Boolean VerifyPwd(string username, string password)
    {
        if (string.IsNullOrEmpty(username))
        {
            return(false);
        }
        if (string.IsNullOrEmpty(password))
        {
            return(false);
        }

        string jiaMiPass = Md5JiaMi.JiaMi(password); //加密密码

        Admin_User valueTable = new Admin_User();


        Admin_User conditionTable = new Admin_User();

        conditionTable.Name = username;
        conditionTable.Pass = jiaMiPass;
        conditionTable.AddConditon(" and States > 0");
        Admin_User admin = TableOperate <Admin_User> .GetRowData(valueTable, conditionTable);

        if (!admin.IsNull)
        {
            GetConfig();
            HttpContext.Current.Session["adminName"] = username;
            if (admin.HeadPic != null && admin.HeadPic != "")
            {
                HttpContext.Current.Session["headpic"] = SysConfig.headpicfile + admin.HeadPic;
            }
            HttpContext.Current.Session["adminFullName"] = admin.FullName;
            HttpContext.Current.Session["adminLevel"]    = admin.UserLevel;
            HttpContext.Current.Session["adminID"]       = admin.ID;
            HttpContext.Current.Session["ExhibitionID"]  = admin.ExhibitionID;
            if (admin.Manage != null && admin.Manage != "")
            {
                string[] arrManage = admin.Manage.Split(',');
                HttpContext.Current.Session["adminManage"] = arrManage;
            }

            UpdateLoginDate(admin.ID); //更新最后登录时间
            string check = admin.ID + "|" + AdminJiaMi(admin.ID, admin.Pass, HttpContext.Current.Request.UserHostName, HttpContext.Current.Request.UserHostAddress);
            // CookieUserCheck = check;


            return(true);
        }
        return(false);
    }
示例#28
0
    public static string GetHtmlUrl(int id)
    {
        ModeChannel condition = new ModeChannel();

        condition.ID = id;
        if (AdminMethod.ExhibitionID != 0)
        {
            condition.ExhibitionID = AdminMethod.ExhibitionID;
        }
        ModeChannel newChannel = TableOperate <ModeChannel> .GetRowData(condition);

        //string tFile = StaticPage.GetUrlRule(newChannel.TemplateFile, id);
        //string relustFile = StaticPage.GetUrlRule(newChannel.LanMuRule, newChannel.RootID, id, 0);
        return("");
    }
示例#29
0
    private void IntoGetWay(int DevID)//增加展区参观人数
    {
        IBeaconGateWay condition = new IBeaconGateWay();

        condition.ID = DevID;
        IBeaconGateWay ibecont = TableOperate <IBeaconGateWay> .GetRowData(condition);

        if (ibecont.ID > 0)
        {
            condition    = new IBeaconGateWay();
            condition.X  = ibecont.X + 1;
            condition.ID = ibecont.ID;
            TableOperate <IBeaconGateWay> .Update(condition);
        }
    }
示例#30
0
    /// <summary>
    /// 修改栏目
    /// </summary>
    public static int Update(TagTree channel)
    {
        //修改信息

        TagTree condition = new TagTree();

        condition.ID = channel.ID;
        TagTree oldChannel = TableOperate <TagTree> .GetRowData(condition);


        if (channel.ParentID != oldChannel.ParentID)
        {
            if (channel.ParentID == 0)
            {
                channel.Depth    = 0;
                channel.ParentID = 0;
                channel.Path     = "0~";
                channel.NamePath = "所有栏目~";
                channel.AddInsert("RootID", "IDENT_CURRENT('Exhibition')");
            }
            else
            {
                condition    = new TagTree();
                condition.ID = channel.ParentID;
                TagTree parentChannel = TableOperate <TagTree> .GetRowData(condition);

                string path     = Convert.ToString(parentChannel.Path) + channel.ParentID + "~";
                string namePath = Convert.ToString(parentChannel.NamePath) + Convert.ToString(parentChannel.Name) + "~";
                channel.Depth    = parentChannel.Depth + 1;
                channel.Path     = path;
                channel.RootID   = parentChannel.RootID;
                channel.NamePath = namePath;
            }
        }
        else
        {
            channel.Depth    = oldChannel.Depth;
            channel.Path     = oldChannel.Path;
            channel.NamePath = oldChannel.NamePath;
            channel.RootID   = oldChannel.RootID;
        }
        //修改下面是有的子项的Depth, Path, RootID, NamePath
        UpdateChild(channel, oldChannel);

        return(TableOperate <TagTree> .Update(channel));
    }