Beispiel #1
0
        public BaseTran <sis> GetSis(string tags)
        {
            //BaseDataDb db = new BaseDataDb();
            var list = new List <sis>();

            string[] tagList = tags.Split(',');
            Bll      bll     = new Bll();

            foreach (var tag in tagList)
            {
                var monitor = bll.DevMonitorNodes.Find(p => p.TagName == tag);
                sis sis     = new sis();
                sis.kks = tag;
                sis.t   = DateTime.Now.ToStamp();
                if (monitor != null)
                {
                    sis.value = monitor.Value;
                    sis.unit  = monitor.Unit;
                }

                if (string.IsNullOrEmpty(sis.value))
                {
                    sis.value = "-1";//代表模拟数据
                }
                list.Add(sis);
            }
            var data = new BaseTran <sis>(list);

            return(data);
        }
    protected void Button2_Click(object sender, EventArgs e)
    {
        sis  s = new sis();
        bool f = s.update(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text, TextBox7.Text, TextBox8.Text);

        if (f == true)
        {
            Response.Write("<script language='javascript'>alert('Updated');</script>");
        }
    }
Beispiel #3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        sis  s = new sis();
        bool f = s.delete(TextBox1.Text);

        if (f == true)
        {
            Response.Write("<script language='javascript'>alert('Deleted');</script>");
            TextBox1.Text = "";
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        sis s = new sis();

        d                = s.search(TextBox1.Text);
        TextBox1.Text    = d.Tables[0].Rows[0][1].ToString();
        TextBox2.Text    = d.Tables[0].Rows[0][2].ToString();
        TextBox3.Text    = d.Tables[0].Rows[0][3].ToString();
        TextBox4.Text    = d.Tables[0].Rows[0][4].ToString();
        TextBox5.Text    = d.Tables[0].Rows[0][5].ToString();
        TextBox6.Text    = d.Tables[0].Rows[0][6].ToString();
        TextBox7.Text    = d.Tables[0].Rows[0][7].ToString();
        TextBox8.Text    = d.Tables[0].Rows[0][8].ToString();
        TextBox1.Enabled = false;
    }
        public BaseTran <sis> GetSomesisList(string kks)
        {
            BaseTran <sis> send = new BaseTran <sis>();
            List <sis>     lst  = new List <sis>();
            Dictionary <string, string> dictCom = new Dictionary <string, string>();

            string[] kkss = null;
            if (kks != null)
            {
                kkss = kks.Split(',');

                for (int i = 0; i < kkss.Length; i++)
                {
                    string val = kkss[i];

                    if (!dictCom.ContainsKey(val))
                    {
                        dictCom.Add(val, val);
                    }
                }
            }

            foreach (var item in dict)
            {
                sis val = item.Value.Clone();
                if (dictCom.ContainsKey(val.kks))
                {
                    lst.Add(val);
                }
            }

            send.total = lst.Count;
            send.msg   = "ok";
            send.data  = lst;

            return(send);
        }
Beispiel #6
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        sis  s = new sis();
        bool f = s.register(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text, TextBox7.Text, TextBox8.Text);

        if (f == true)
        {
            Response.Write("<script language='javascript'>alert('Registered');</script>");
            Autogenrate();
            //TextBox1.Text="";
            TextBox2.Text = "";
            TextBox3.Text = "";
            TextBox4.Text = "";
            TextBox5.Text = "";
            TextBox7.Text = "";
            TextBox8.Text = "";
        }
        else
        {
            Response.Write("<script language='javascript'>alert('Problem in Registeration');</script>");
            Autogenrate();
            //TextBox1.Text = "";
        }
    }
    protected void Button4_Click(object sender, EventArgs e)
    {
        sis s = new sis();

        d = s.search(TextBox4.Text);
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        sis s = new sis();

        d = s.sphone(TextBox3.Text);
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        sis s = new sis();

        d = s.sdob(TextBox2.Text);
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        sis s = new sis();

        d = s.smail(TextBox1.Text);
    }