protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         DataTable dt = new StateApplicationDA().GetTopBuss();
         if (null != dt)
         {
             rpApp.DataSource = dt;
             rpApp.DataBind();
         }
     }
 }
        public void HeadTop(List<ApplListOR> list)
        {
            string id = Request.QueryString["GUID"];
            DataTable objDev = new StateApplicationDA().GetSysLay(Convert.ToInt32(id));
            if (objDev != null)
            {
                objDev.DefaultView.RowFilter = string.Format(" typeid=2 or typeid=3 or typeid=10 ");
                DataTable dt = objDev.DefaultView.ToTable();
                if (dt != null && dt.Rows.Count > 0)
                {
                    ApplListOR obj = HeadStatusAndWaring(dt);
                    obj.DeviceID = id;
                    obj.DeviceName = "软件层";
                    obj.TypeName = "业务系统";
                    obj.TypeEN = "soft";
                    list.Add(obj);
                }

                objDev.DefaultView.RowFilter = string.Format(" typeid=4");
                dt = objDev.DefaultView.ToTable();
                if (dt != null && dt.Rows.Count > 0)
                {
                    ApplListOR obj = HeadStatusAndWaring(dt);
                    obj.DeviceID = id;
                    obj.DeviceName = "数据库层";
                    obj.TypeName = "业务系统";
                    obj.TypeEN = "DB";
                    list.Add(obj);
                }

                objDev.DefaultView.RowFilter = string.Format(" typeid=1");
                dt = objDev.DefaultView.ToTable();
                if (dt != null && dt.Rows.Count > 0)
                {
                    ApplListOR obj = HeadStatusAndWaring(dt);
                    obj.DeviceID = id;
                    obj.DeviceName = "硬件层";
                    obj.TypeName = "业务系统";
                    obj.TypeEN = "HD";
                    list.Add(obj);
                }
            }
        }
        public void HeadSoft(List<ApplListOR> list)
        {
            string id = Request.QueryString["GUID"];
            DataTable objDev = new StateApplicationDA().GetSysLay(Convert.ToInt32(id), " (dt.typeid=2 or dt.typeid=3 )");
            if (objDev != null && objDev.Rows.Count > 0)
            {
                ApplListOR obj = HeadStatusAndWaring(objDev);
                obj.DeviceID = id;
                obj.DeviceName = "Web层";
                obj.TypeName = "业务系统";
                obj.TypeEN = "web";
                list.Add(obj);
            }

            objDev = new StateApplicationDA().GetSysLay(Convert.ToInt32(id), 10);
            if (objDev != null && objDev.Rows.Count > 0)
            {
                ApplListOR obj = HeadStatusAndWaring(objDev);
                obj.DeviceID = id;
                obj.DeviceName = "应用层";
                obj.TypeName = "业务系统";
                obj.TypeEN = "use";
                list.Add(obj);
            }
        }
        public void HeadOther(List<ApplListOR> list, string mtype)
        {
            string id = Request.QueryString["GUID"];
            DataTable dt = null;
            switch (mtype)
            {
                case "server":
                    dt = new StateApplicationDA().GetSysLay(Convert.ToInt32(id), 1);
                    break;
                case "use":
                    dt = new StateApplicationDA().GetSysLay(Convert.ToInt32(id), 10);
                    break;
                case "web":
                    dt = new StateApplicationDA().GetSysLay(Convert.ToInt32(id), " (dt.typeid=2 or dt.typeid=3 )");
                    break;
                case "DB":
                    dt = new StateApplicationDA().GetSysLay(Convert.ToInt32(id), 4);
                    break;
            }
            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    ApplListOR obj = new ApplListOR();
                    obj.DeviceID = dr["DeviceID"].ToString();
                    obj.DeviceName = dr["DeviceName"].ToString();
                    obj.TypeName = dr["TypeName"].ToString();
                    obj.typeID = Convert.ToInt32(dr["typeid"].ToString());

                    obj.Status = Convert.ToInt32(dr["DeviceStatus"].ToString());
                    obj.StatusShow = dr["DeviceStatusName"].ToString();
                    obj.Warning = Convert.ToInt32(dr["WarningStatus"].ToString());
                    obj.WarningShow = dr["WarningStatusName"].ToString();
                    list.Add(obj);
                }
            }
        }
 public void HeadHD(List<ApplListOR> list)
 {
     string id = Request.QueryString["GUID"];
     DataTable objDev = new StateApplicationDA().GetSysLay(Convert.ToInt32(id), 1);
     if (objDev != null)
     {
         ApplListOR obj = HeadStatusAndWaring(objDev);
         obj.DeviceID = id;
         obj.DeviceName = "服务器";
         obj.TypeName = "业务系统";
         obj.TypeEN = "server";
         list.Add(obj);
     }
 }