Ejemplo n.º 1
0
        private string GetAllList()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("[");
            T_Organization model = new T_Organization();

            if (admin.UnitCode != "371082")//判断是否是荣成市
            {
                model = dal.GetModel(admin.UnitCode);
            }
            else
            {
                model = dal.GetHighestLevel();
                dynamic dataTable = dal.GetLower(model.OrgCode);
                for (int i = 1; i < dataTable.Rows.Count + 1; i++)
                {
                    stringBuilder.Append("{\"id\":\"" + dataTable.Rows[i - 1]["OrgCode"] + "\", \"name\":\"" + dataTable.Rows[i - 1]["OrgShortName"] + "\",\"nodes\":[]}");
                    if (i < dataTable.Rows.Count)
                    {
                        stringBuilder.Append(",");
                    }
                }
            }
            stringBuilder.Append("]");
            return("[{\"id\":\"" + model.OrgCode + "\", \"name\":\"" + model.OrgShortName + "\",\"nodes\":" + stringBuilder.ToString() + ",\"open\":\"true\"}]");
        }
Ejemplo n.º 2
0
        public T_Organization GetModelByUnit()
        {
            string         strSql = "select top 1 [OrgCode],[OrgName],[OrgShortName],[UpOrgCode],[Seq],[Level],[ShengCode],[ShiCode],[XianCode],[XiangCode],[CunCode],[ZunCode] from T_Organization order by [Level] desc";
            T_Organization model  = null;

            using (dynamic read = DbHelper.Factory().ExecuteReader(strSql))
            {
                model = new T_Organization();
                if (read.Read())
                {
                    model.OrgCode      = read["OrgCode"].ToString();
                    model.OrgName      = read["OrgName"].ToString();
                    model.OrgShortName = read["OrgShortName"].ToString();
                    model.UpOrgCode    = read["UpOrgCode"].ToString();
                    model.Seq          = int.Parse(read["Seq"].ToString());
                    model.Level        = int.Parse(read["Level"].ToString());
                    model.ShengCode    = read["ShengCode"].ToString();
                    model.ShiCode      = read["ShiCode"].ToString();
                    model.XianCode     = read["XianCode"].ToString();
                    model.XiangCode    = read["XiangCode"].ToString();
                    model.CunCode      = read["CunCode"].ToString();
                    model.ZunCode      = read["ZunCode"].ToString();
                }
                read.Dispose();
            }
            return(model);
        }
Ejemplo n.º 3
0
        public void UnBindItem()
        {
            IsPaired = false;
            if (T_Organization.TempData != null)
            {
                T_Organization.GetTempData();
            }
            if (T_Item.TempData != null)
            {
                T_Item.TempData = null;
                //T_Item.GetTempData();
            }
            item_init(Parent as DeviceTreeItemViewModel);

            //T_Item.SlaveIdentifier = null;
            //T_Item.CardNum = -1;
            //T_Item.SlotNum = -1;
            //T_Item.CHNum = -1;
            //T_Item.ItemType = -1;
            //T_Item.IP = null;
            //T_Item.Identifier = null;
            //T_Item.ServerIP = null;
            //T_Organization.Guid = Guid.NewGuid();
            //T_Item.ChannelHDID = null;
            BreakDivFre();
            BaseAlarmSignal = null;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public T_Organization DataRowToModel(DataRow row)
        {
            T_Organization model = new T_Organization();

            if (row != null)
            {
                if (row["OrgCode"] != null)
                {
                    model.OrgCode = row["OrgCode"].ToString();
                }
                if (row["OrgName"] != null)
                {
                    model.OrgName = row["OrgName"].ToString();
                }
                if (row["OrgShortName"] != null)
                {
                    model.OrgShortName = row["OrgShortName"].ToString();
                }
                if (row["UpOrgCode"] != null)
                {
                    model.UpOrgCode = row["UpOrgCode"].ToString();
                }
                if (row["Seq"] != null && row["Seq"].ToString() != "")
                {
                    model.Seq = int.Parse(row["Seq"].ToString());
                }
                if (row["Level"] != null && row["Level"].ToString() != "")
                {
                    model.Level = int.Parse(row["Level"].ToString());
                }
                if (row["ShengCode"] != null)
                {
                    model.ShengCode = row["ShengCode"].ToString();
                }
                if (row["ShiCode"] != null)
                {
                    model.ShiCode = row["ShiCode"].ToString();
                }
                if (row["XianCode"] != null)
                {
                    model.XianCode = row["XianCode"].ToString();
                }
                if (row["XiangCode"] != null)
                {
                    model.XiangCode = row["XiangCode"].ToString();
                }
                if (row["CunCode"] != null)
                {
                    model.CunCode = row["CunCode"].ToString();
                }
                if (row["ZunCode"] != null)
                {
                    model.ZunCode = row["ZunCode"].ToString();
                }
            }
            return(model);
        }
Ejemplo n.º 5
0
 public void BindItem()
 {
     IsPaired = true;
     if (T_Item.TempData != null)
     {
         T_Item.GetTempData();
     }
     if (T_Organization.TempData != null)
     {
         T_Organization.GetTempData();
     }
     //InitSignal();
 }
Ejemplo n.º 6
0
        //从回收站取出
        public ItemTreeItemViewModel RestoredItemTreeItem(ItemTreeItemViewModel recycle)
        {
            if (T_Organization == null || T_Item == null)
            {
                return(this);
            }
            T_Organization.GetTempData();

            /*
             * T_Organization.Name = recycle.T_Organization.Name;
             * T_Organization.Code = recycle.T_Organization.Code;
             * T_Organization.Guid = recycle.T_Organization.Guid;
             * //T_Organization.Level = recycle.T_Organization.Level;
             * //T_Organization.Sort_No = recycle.T_Organization.Sort_No;
             * T_Organization.Create_Time = recycle.T_Organization.Create_Time;
             * T_Organization.Modify_Time = DateTime.Now;
             * T_Organization.Is_Disabled = false;
             * //T_Organization.Parent_Code = recycle.T_Organization.Parent_Code;
             * //T_Organization.Parent_Guid = recycle.T_Organization.Parent_Guid;
             * //T_Organization.Parent_Level = recycle.T_Organization.Parent_Level;
             * T_Organization.Remarks = recycle.T_Organization.Remarks;
             * //T_Organization.NodeType = recycle.T_Organization.NodeType;*/

            recycle.T_Item.GetTempData();
            T_Item.id            = recycle.T_Item.id;
            T_Item.CardNum       = recycle.T_Item.CardNum;
            T_Item.SlotNum       = recycle.T_Item.SlotNum;
            T_Item.CHNum         = recycle.T_Item.CHNum;
            T_Item.Guid          = recycle.T_Item.Guid;
            T_Item.Name          = recycle.T_Item.Name;
            T_Item.Code          = recycle.T_Item.Code;
            T_Item.T_Device_Guid = this.T_Organization.Parent_Guid.Value; // recycle.T_Item.T_Device_Guid;
            T_Item.T_Device_Code = this.T_Organization.Parent_Code;       //recycle.T_Item.T_Device_Code;
            T_Item.Remarks       = recycle.T_Item.Remarks;
            T_Item.Create_Time   = recycle.T_Item.Create_Time;
            T_Item.Modify_Time   = recycle.T_Item.Modify_Time;
            //T_Item.Sort_No = recycle.T_Item.Sort_No;
            T_Item.Is_Disabled     = false;
            T_Item.IP              = recycle.T_Item.IP;
            T_Item.Identifier      = recycle.T_Item.Identifier;
            T_Item.ServerIP        = recycle.T_Item.ServerIP;//废弃ServerIP,但数据库不允许为空,依旧填充//改为初始化时候填充,覆盖数据库的ServerIP。
            T_Item.ItemType        = recycle.T_Item.ItemType;
            T_Item.SlaveIdentifier = recycle.T_Item.SlaveIdentifier;
            T_Item.ChannelHDID     = recycle.T_Item.ChannelHDID;

            IsPaired   = true;
            IsExpanded = true;

            return(this);
        }
Ejemplo n.º 7
0
        protected void BindDll()
        {
            NCPEP.Bll.T_Organization bll = new T_Organization();
            string    strorgcode         = System.Configuration.ConfigurationManager.AppSettings["orgcode"];
            DataTable dt = bll.GetList(" UpOrgCode='" + strorgcode + "'").Tables[0];

            if (dt.Rows.Count > 0)
            {
                this.ddlorg.DataSource     = dt;
                this.ddlorg.DataTextField  = "OrgShortName";
                this.ddlorg.DataValueField = "OrgCode";
                this.ddlorg.DataBind();
            }
        }
Ejemplo n.º 8
0
        public ApiResult Delete(string access_token, string orgID)
        {
            result = AccessToken.Check(access_token, "api/org/delete");
            if (result == null)
            {
                #region 参数验证
                if (orgID == null || orgID == "")
                {
                    Dictionary <string, string> errorFields = new Dictionary <string, string>();
                    errorFields.Add("orgID", "orgID");
                    return(Error("参数格式错误", errorFields));
                }
                #endregion

                #region 逻辑操作
                var orgModel = from T_Organization in db.T_Organization where (T_Organization.OrgID == orgID) select T_Organization;
                if (orgModel.Any())
                {
                    var awardList = from T_AwdRecord in db.T_AwdRecord where (T_AwdRecord.OrgID == orgID) select T_AwdRecord;
                    var honorList = from T_HnrRecord in db.T_HnrRecord where (T_HnrRecord.OrgID == orgID) select T_HnrRecord;

                    if (awardList.Any() || honorList.Any())
                    {
                        return(Error("数据库中包含此奖项获奖记录,不能删除"));
                    }
                    else
                    {
                        try
                        {
                            T_Organization model = db.T_Organization.Find(orgID);
                            db.T_Organization.Remove(model);
                            db.SaveChanges();

                            return(Success("删除成功"));
                        }
                        catch
                        {
                            return(Error("删除失败"));
                        }
                    }
                }
                else
                {
                    return(Error("数据库中不包含此竞赛项目ID"));
                }
                #endregion
            }
            return(result);
        }
Ejemplo n.º 9
0
        private string GetOrglist(HttpContext context)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("[");

            T_Organization model = dal.GetHighestLevel();

            if (context.Request.QueryString["id"] != null)
            {
                dynamic dataTable = dal.GetLower(context.Request.QueryString["id"]);
                for (int i = 1; i < dataTable.Rows.Count + 1; i++)
                {
                    string stropen = "\"state\"" + ":" + "\"open\"";
                    if (Has_child(dataTable.Rows[i - 1]["OrgCode"]))
                    {
                        stropen = "\"state\"" + ":" + "\"closed\"";
                    }
                    stringBuilder.Append("{\"id\":\"" + dataTable.Rows[i - 1]["OrgCode"] + "\", \"text\":\"" + dataTable.Rows[i - 1]["OrgShortName"] + "\",\"children\":[]," + stropen + "}");
                    if (i < dataTable.Rows.Count)
                    {
                        stringBuilder.Append(",");
                    }
                }
                stringBuilder.Append("]");
                return(stringBuilder.ToString());
            }
            else
            {
                dynamic dataTable = dal.GetLower(model.OrgCode);
                for (int i = 1; i < dataTable.Rows.Count + 1; i++)
                {
                    string stropen = "\"state\"" + ":" + "\"open\"";
                    if (Has_child(dataTable.Rows[i - 1]["OrgCode"]))
                    {
                        stropen = "\"state\"" + ":" + "\"closed\"";
                    }
                    stringBuilder.Append("{\"id\":\"" + dataTable.Rows[i - 1]["OrgCode"] + "\", \"text\":\"" + dataTable.Rows[i - 1]["OrgShortName"] + "\",\"children\":[]," + stropen + "}");
                    if (i < dataTable.Rows.Count)
                    {
                        stringBuilder.Append(",");
                    }
                }
                stringBuilder.Append("]");
                string str = "[{\"id\":\"" + model.OrgCode + "\", \"text\":\"" + model.OrgShortName + "\",\"children\":" + stringBuilder.ToString() + ",\"state\":\"open\"}]";
                return("[{\"id\":\"3710\", \"text\":\"组织单位\",\"children\":" + str + ",\"state\":\"open\"}]");
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public int GetLevel(string orgCode)
        {
            int            level  = 0;
            string         strSql = string.Format("select top 1 [OrgCode],[OrgName],[OrgShortName],[UpOrgCode],[Seq],[Level],[ShengCode],[ShiCode],[XianCode],[XiangCode],[CunCode],[ZunCode] from T_Organization where OrgCode = '{0}'", orgCode);
            T_Organization model  = null;

            using (dynamic read = DbHelper.Factory().ExecuteReader(strSql))
            {
                model = new T_Organization();
                if (read.Read())
                {
                    level = int.Parse(read["Level"].ToString());
                }
                read.Dispose();
            }
            return(level);
        }
Ejemplo n.º 11
0
        //修改
        private string Edit(HttpContext context)
        {
            NCCQ.Model.T_Organization model = new T_Organization();
            model = dal.GetModel(context.Request.QueryString["upid"]);

            model.OrgCode      = context.Request.Form["OrgCode"];
            model.OrgName      = context.Request.Form["OrgName"];
            model.OrgShortName = context.Request.Form["OrgShortName"];
            model.Seq          = int.Parse(context.Request.Form["Seq"]);


            if (dal.Update(model))
            {
                return("组织单位信息修改成功!");
            }
            else
            {
                return("组织单位信息修改失败,错误代码:500 ");
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public T_Organization GetModel(string OrgCode)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1  ");
            strSql.Append(" OrgCode,OrgName,OrgShortName,UpOrgCode,Seq,Level,ShengCode,ShiCode,XianCode,XiangCode,CunCode,ZunCode ");
            strSql.Append(" from T_Organization ");
            strSql.Append(" where OrgCode='" + OrgCode + "' ");
            T_Organization model = new T_Organization();
            DataTable      ds    = DbHelper.Factory().ExecuteDataTable(strSql.ToString());

            if (ds.Rows.Count > 0)
            {
                return(DataRowToModel(ds.Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 13
0
        //添加
        private string Create(HttpContext context)
        {
            NCCQ.Model.T_Organization modelup = new T_Organization();
            modelup = dal.GetModel(context.Request.QueryString["upid"]);
            NCCQ.Model.T_Organization model = new T_Organization();
            model.Level        = modelup.Level - 1;
            model.OrgCode      = context.Request.Form["OrgCode"];
            model.OrgName      = context.Request.Form["OrgName"];
            model.OrgShortName = context.Request.Form["OrgShortName"];
            model.Seq          = int.Parse(context.Request.Form["Seq"]);
            model.UpOrgCode    = context.Request.QueryString["upid"];

            if (dal.Add(model))
            {
                return("组织单位信息添加成功!");
            }
            else
            {
                return("组织单位信息添加失败,错误代码:500 ");
            }
        }
Ejemplo n.º 14
0
        public ApiResult Add([FromBody] OrganizationAdd model)
        {
            result = AccessToken.Check(model.access_token, "api/org/add");
            if (result == null)
            {
                #region 参数验证
                result = ParameterCheck.CheckParameters(model);
                if (result != null)
                {
                    return(result);
                }
                #endregion

                #region 逻辑操作
                var orgModel = from T_Organization in db.T_Organization where (T_Organization.Name == model.Name) select T_Organization;
                if (orgModel.Any())
                {
                    return(Error("该条记录已存在"));
                }
                else
                {
                    try
                    {
                        T_Organization org = new T_Organization();
                        org.OrgID = Guid.NewGuid().ToString();
                        org.Name  = model.Name;
                        db.T_Organization.Add(org);
                        db.SaveChanges();

                        return(Success("添加成功"));
                    }
                    catch
                    {
                        return(Error("添加失败,请检查参数是否正确"));
                    }
                }
                #endregion
            }
            return(result);
        }
Ejemplo n.º 15
0
        public ApiResult Modify([FromBody] OrganizationModify model)
        {
            result = AccessToken.Check(model.access_token, "api/org/modify");
            if (result == null)
            {
                result = ParameterCheck.CheckParameters(model);
                if (result == null)
                {
                    #region 参数验证
                    #endregion

                    #region 逻辑操作
                    T_Organization orgModel = db.T_Organization.Find(model.OrgID);
                    if (orgModel != null)
                    {
                        try
                        {
                            orgModel.Name = model.Name;
                            db.SaveChanges();
                            return(Success("修改成功"));
                        }
                        catch
                        {
                            return(Success("修改失败,请检查参数是否正确"));
                        }
                    }
                    else
                    {
                        return(Error("数据错误,无法查找到此条记录"));
                    }
                    #endregion
                }
                return(result);
            }
            return(result);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(T_Organization model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_Organization set ");
            if (model.OrgName != null)
            {
                strSql.Append("OrgName='" + model.OrgName + "',");
            }
            if (model.OrgShortName != null)
            {
                strSql.Append("OrgShortName='" + model.OrgShortName + "',");
            }
            if (model.UpOrgCode != null)
            {
                strSql.Append("UpOrgCode='" + model.UpOrgCode + "',");
            }
            if (model.Seq != null)
            {
                strSql.Append("Seq=" + model.Seq + ",");
            }
            if (model.Level != null)
            {
                strSql.Append("Level=" + model.Level + ",");
            }
            if (model.ShengCode != null)
            {
                strSql.Append("ShengCode='" + model.ShengCode + "',");
            }
            else
            {
                strSql.Append("ShengCode= null ,");
            }
            if (model.ShiCode != null)
            {
                strSql.Append("ShiCode='" + model.ShiCode + "',");
            }
            else
            {
                strSql.Append("ShiCode= null ,");
            }
            if (model.XianCode != null)
            {
                strSql.Append("XianCode='" + model.XianCode + "',");
            }
            else
            {
                strSql.Append("XianCode= null ,");
            }
            if (model.XiangCode != null)
            {
                strSql.Append("XiangCode='" + model.XiangCode + "',");
            }
            else
            {
                strSql.Append("XiangCode= null ,");
            }
            if (model.CunCode != null)
            {
                strSql.Append("CunCode='" + model.CunCode + "',");
            }
            else
            {
                strSql.Append("CunCode= null ,");
            }
            if (model.ZunCode != null)
            {
                strSql.Append("ZunCode='" + model.ZunCode + "',");
            }
            else
            {
                strSql.Append("ZunCode= null ,");
            }
            int n = strSql.ToString().LastIndexOf(",");

            strSql.Remove(n, 1);
            strSql.Append(" where OrgCode='" + model.OrgCode + "' ");
            int rowsAffected = DbHelper.Factory().ExecuteNonQuery(strSql.ToString());

            if (rowsAffected > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 17
0
 public void UnBindTemp()
 {
     T_Organization.UnBindTemp();
     T_Item.UnBindTemp();
 }
Ejemplo n.º 18
0
 private T_Organization GetById(HttpContext context)
 {
     NCCQ.Model.T_Organization model = new T_Organization();
     model = dal.GetModel(context.Request.QueryString["id"]);
     return(model);
 }
Ejemplo n.º 19
0
        /// <summary>
        ///
        /// </summary>
        protected void Bindbszn()
        {
            NCPEP.Bll.T_News newsbll = new T_News();
            DataTable        dt      = newsbll.GetList(6, " NewsTypeId=4", "CreateDate").Tables[0];
            //this.repbszn.DataSource = dt;
            //this.repbszn.DataBind();
            DataTable dtxw = newsbll.GetList(10, "NewsTypeId=1 and IsCheck='1'", "CreateDate desc").Tables[0];

            this.repxinwen.DataSource = dtxw;
            this.repxinwen.DataBind();
            dtxw = new DataTable();
            dtxw = newsbll.GetList(12, "NewsTypeId=9 and IsCheck='1'", "CreateDate desc").Tables[0];
            this.repnotice.DataSource = dtxw;
            this.repnotice.DataBind();
            DataTable     dtgz = newsbll.GetListNotice(3, "NewsTypeId=9 and IsCheck='1'", "CreateDate desc").Tables[0];
            StringBuilder sb   = new StringBuilder();

            if (dtgz.Rows.Count > 0)
            {
                for (int i = 0; i < dtgz.Rows.Count; i++)
                {
                    sb.Append("<a target=\"_blank\" href=\"NewsDetails.aspx?t=9&id=" + dtgz.Rows[i]["id"] + "\">");
                    string strtitle = dtgz.Rows[i]["NewsTitle"].ToString();
                    strtitle = strtitle.Length > 35 ? strtitle.Substring(0, 35) + "..." : strtitle;
                    sb.Append("" + strtitle + "    ");
                    sb.Append("</a>");
                }
            }
            //通知公告
            tzgg = sb.ToString(); //"<a href=\"\">dddd</a>";
            //专题活动
            dt    = new DataTable();
            dt    = newsbll.GetList(4, " NewsTypeId=5 and ztbz!='是' and IsCheck='1'", "CreateDate desc").Tables[0];
            zxzt1 = zxzt2 = "";
            wqzt  = wqzt2 = "";
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    #region 专题活动
                    if (i == 0)
                    {
                        zxzt1 = "<a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_img\" target=\"_blank\"><img src=\"newsImg/max/" + dt.Rows[i]["NewsImg"] + "\" style=\"width:196px; height:128px;\"></a><div class=\"fl\"><a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_t\" target=\"_blank\">" + dt.Rows[i]["NewsTitle"] + "</a><p>" + dt.Rows[i]["NewsContent"] + "</p></div>";
                    }
                    if (i == 1)
                    {
                        zxzt2 = "<a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_img\" target=\"_blank\"><img src=\"newsImg/max/" + dt.Rows[i]["NewsImg"] + "\" style=\"width:196px; height:128px;\"></a><div class=\"fl\"><a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_t\" target=\"_blank\">" + dt.Rows[i]["NewsTitle"] + "</a><p>" + dt.Rows[i]["NewsContent"] + "</p></div>";
                    }
                    if (i == 2)
                    {
                        wqzt = "<a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_img\" target=\"_blank\"><img src=\"newsImg/max/" + dt.Rows[i]["NewsImg"] + "\" style=\"width:196px; height:128px;\"></a><div class=\"fl\"><a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_t\" target=\"_blank\">" + dt.Rows[i]["NewsTitle"] + "</a><p>" + dt.Rows[i]["NewsContent"] + "</p></div>";
                    }
                    if (i == 3)
                    {
                        wqzt2 = "<a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_img\" target=\"_blank\"><img src=\"newsImg/max/" + dt.Rows[i]["NewsImg"] + "\" style=\"width:196px; height:128px;\"></a><div class=\"fl\"><a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[i]["id"] + "\" class=\"zt_t\" target=\"_blank\">" + dt.Rows[i]["NewsTitle"] + "</a><p>" + dt.Rows[i]["NewsContent"] + "</p></div>";
                    }
                    #endregion
                }
            }
            #region 专题通栏图片
            zttp = "<img src=\"images/ban.jpg\"/>";
            dt   = new DataTable();
            dt   = newsbll.GetList(1, " NewsTypeId=5 and ztbz='是' and IsCheck='1'", "CreateDate desc").Tables[0];
            if (dt.Rows.Count > 0)
            {
                zttp = "<a href=\"NewsDetails.aspx?t=5&id=" + dt.Rows[0]["id"] + "\" target=\"_blank\"><img src=\"newsImg/max/" + dt.Rows[0]["NewsImg"] + "\" style=\" width:1000px; height:154px;\"/></a> ";
            }
            #endregion
            #region 业务办理
            dt   = new DataTable();
            zcfg = "<li><a href=\"\" target=\"_blank\" ></a><span></span></li>";
            dt   = newsbll.GetList(11, "NewsTypeId=11  and IsCheck='1'", "CreateDate desc").Tables[0];
            if (dt.Rows.Count > 0)
            {
                zcfg = "";
                foreach (DataRow dr in dt.Rows)
                {
                    string biaoti = dr["NewsTitle"].ToString().Length > 24 ? dr["NewsTitle"].ToString().Substring(0, 24) + ".." : dr["NewsTitle"].ToString();
                    zcfg += "<li><a href=\"newsdetails.aspx?ntid=" + dr["NewsTypeId"] + "&id=" + dr["id"] + "\" target=\"_blank\" >" + biaoti + "</a><span>" + DateTime.Parse(dr["CreateDate"].ToString()).ToString("yyyy-MM-dd") + "</span></li>";
                }
            }
            #endregion
            #region //日常工作
            dt   = new DataTable();
            jygz = "<li><a href=\"\" target=\"_blank\" ></a><span></span></li>";
            dt   = newsbll.GetList(11, "NewsTypeId=12  and IsCheck='1'", "CreateDate desc").Tables[0];
            if (dt.Rows.Count > 0)
            {
                jygz = "";
                foreach (DataRow dr in dt.Rows)
                {
                    string biaoti = dr["NewsTitle"].ToString().Length > 24 ? dr["NewsTitle"].ToString().Substring(0, 24) + ".." : dr["NewsTitle"].ToString();
                    jygz += "<li><a href=\"newsdetails.aspx?ntid=" + dr["NewsTypeId"] + "&id=" + dr["id"] + "&t=" + dr["NewsTypeId"] + "\" target=\"_blank\" >" + biaoti + "</a><span>" + DateTime.Parse(dr["CreateDate"].ToString()).ToString("yyyy-MM-dd") + "</span></li>";
                }
            }
            #endregion
            #region 分支机构
            //fzjg1 = "<li id=\"jg2\" onmouseover=\"shitabs('jg','jgc','3','2','frist')\">南昌市1</li>";
            dt = new DataTable();
            NCPEP.Bll.T_Organization bllorg = new T_Organization();
            dt = bllorg.GetList("UpOrgCode='3601'").Tables[0];
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    int nu  = i + 2;
                    int nu2 = nu + 1;
                    fzjg1 += "<li id=\"jg" + nu + "\" onmouseover=\"shitabs('jg','jgc','" + nu2 + "','" + nu + "','frist')\">" + dt.Rows[i]["OrgShortName"] + "</li>";
                    DataTable dtzhen = new DataTable();
                    dtzhen = bllorg.GetList("UpOrgCode='" + dt.Rows[i]["OrgCode"] + "'").Tables[0];
                    fzjg2 += "<ul  id=\"jgc" + nu + "\"  style=\"display:none; \">";
                    if (dtzhen.Rows.Count > 0)
                    {
                        for (int j = 0; j < dtzhen.Rows.Count; j++)
                        {
                            fzjg2 += "<li><a href=\"\">" + dtzhen.Rows[j]["OrgShortName"] + "</a></li>";
                        }
                    }
                    fzjg2 += "</ul>";
                }
            }
            #endregion
        }