Exemplo n.º 1
0
        private string selectaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            string building = "";
            int    r        = 0;
            string locno    = "";

            Business.Base.BusinessLocation loc2 = new Business.Base.BusinessLocation();
            foreach (Entity.Base.EntityLocation it in loc2.GetListQuery(string.Empty, string.Empty, jp.getValue("RMLOCNo2")))
            {
                if (r == 0)
                {
                    building += "<span class=\"btn btn-primary radius\" id=\"" + it.LOCNo + "\">" + it.LOCName + "</span>";
                    locno     = it.LOCNo;
                }
                else
                {
                    building += "<span class=\"btn btn-default radius\" id=\"" + it.LOCNo + "\" onclick=\"getRM('" + it.LOCNo + "')\">" + it.LOCName + "</span>";
                }
                r++;
            }

            collection.Add(new JsonStringValue("building", building));
            collection.Add(new JsonStringValue("rmlist", getRMList(jp.getValue("RMLOCNo1"), jp.getValue("RMLOCNo2"), locno, jp.getValue("RMID"), jp.getValue("CustName"), jp.getValue("RMStatus"))));

            collection.Add(new JsonStringValue("type", "select"));
            collection.Add(new JsonStringValue("flag", flag));
            return(collection.ToString());
        }
Exemplo n.º 2
0
        private string getvalueaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag    = "1";
            string subtype = "";

            try
            {
                int row = 0;
                Business.Base.BusinessLocation bt = new Business.Base.BusinessLocation();
                foreach (Entity.Base.EntityLocation it in bt.GetListQuery(string.Empty, string.Empty, jp.getValue("parent")))
                {
                    subtype += it.LOCNo + ":" + it.LOCName + ";";
                    row++;
                }

                collection.Add(new JsonNumericValue("row", row));
                collection.Add(new JsonStringValue("subtype", subtype));
                collection.Add(new JsonStringValue("child", jp.getValue("child")));
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "getvalue"));
            collection.Add(new JsonStringValue("flag", flag));

            return(collection.ToString());
        }
Exemplo n.º 3
0
        string System.Web.UI.ICallbackEventHandler.GetCallbackResult()
        {
            string         result = "";
            JsonArrayParse jp     = new JsonArrayParse(this._clientArgument);

            if (jp.getValue("Type") == "select")
            {
                result = selectaction(jp);
            }
            else if (jp.getValue("Type") == "getRM")
            {
                result = getRMaction(jp);
            }
            else if (jp.getValue("Type") == "getvalue")
            {
                result = getvalueaction(jp);
            }
            return(result);
        }