Esempio n. 1
0
        public string GetFlatPCLHtml(int flatid)
        {
            string         html     = "";
            PLCService     ps       = new PLCService();
            FlatPLCService fservice = new FlatPLCService();
            var            model    = ps.GetAllPLC();

            html += "<div id='panelPLC'>";
            foreach (var pm in model)
            {
                bool bl = fservice.IsPLCinFlat(pm.PLCID, flatid);
                if (bl == true)
                {
                    string id = pm.PLCID.ToString();
                    html += @"<label class='checkbox'><input type='checkbox' value='" + pm.PLCID + "' name='" + pm.PLCName + "' id='" + id + "' checked='checked'><i></i> " + pm.PLCName + "</label>";
                }
                else
                {
                    string id = pm.PLCID.ToString();
                    html += @"<label class='checkbox'><input type='checkbox' value='" + pm.PLCID + "' name='" + pm.PLCName + "' id='" + id + "'><i></i> " + pm.PLCName + "</label>";
                }
            }
            html += "</div></div>";
            return(html);
        }
Esempio n. 2
0
        public string GetPCLHtml()
        {
            string     html  = "";
            PLCService ps    = new PLCService();
            var        model = ps.GetAllPLC();

            html += "<div id='panelPLC'>";
            foreach (var pm in model)
            {
                string id = pm.PLCID.ToString();
                html += @"<label class='checkbox'><input type='checkbox' value='" + pm.PLCID + "' name='" + pm.PLCName + "' id='" + id + "'><i></i> " + pm.PLCName + "</label>";
            }
            html += "</div></div>";
            return(html);
        }
Esempio n. 3
0
        public string FlatHmtl(string TotalFlat)
        {
            string FltHtml   = "";
            int    flatcount = Convert.ToInt32(TotalFlat);

            for (int i = 1; i <= flatcount; i++)
            {
                string     html  = fservice.FlatCreateBody();
                PLCService ps    = new PLCService();
                var        model = ps.GetAllPLC();
                html += "<div id='panel" + i.ToString() + "'>";
                foreach (var pm in model)
                {
                    string id = pm.PLCID.ToString() + " " + i.ToString();
                    html += @"<label class='checkbox'><input type='checkbox' value='" + pm.PLCID + "' name='" + pm.PLCName + "' id='" + id + "'><i></i> " + pm.PLCName + "</label>";
                }
                html    += "</div></div>";
                FltHtml += html.Replace("<% FlatNo %>", "FlatNo" + i).Replace("<% PreIncrement %>", "PreIncrement" + i);
            }
            return(FltHtml);
        }
 public string PLCList()
 {
     return(Newtonsoft.Json.JsonConvert.SerializeObject(pservice.GetAllPLC()));
 }