Beispiel #1
0
        private void BindDrop()
        {
            dpdAlarmlevel.DataSource=  new AlarmLevelSetDA().selectAllData();
              dpdAlarmlevel.DataTextField = "LevelName";
              dpdAlarmlevel.DataValueField = "Priority";
              dpdAlarmlevel.DataBind();

              DataTable dt = new AlarmGroupsDA().SelectAllDate();
              foreach (DataRow dr in dt.Rows)
              {
              ListItem li = new ListItem();
              li.Value = dr["AlarmGroupsID"].ToString();
              li.Text = dr["GroupName"].ToString();
              cbAlertGroup.Items.Add(li);
              }

               dt = new DisarmTimeDA().selectAllDate();
              foreach (DataRow dr in dt.Rows)
              {
              ListItem li = new ListItem();
              li.Value = dr["DisarmID"].ToString();
              li.Text = dr["DisarmName"].ToString();
              cbDisarmid.Items.Add(li);
              }
        }
        private void LoadData()
        {
            try
            {
                AlarmGroupsOR m_Alar = new AlarmGroupsDA().selectARowDate(Request.QueryString["id"]);
                txtGroupname.Text = m_Alar.Groupname;//组名称
                dpdStationID.SelectedValue = m_Alar.Stationid.ToString();//站点ID

            }
            catch (Exception e)
            {
                Alert(e);
            }
        }