//ROUTE: ../plugin/widget public static string getWidgetUrl(string widget_name, string reservation_id) { if (widget_name == "camera1") { widgetUrl widget1 = new widgetUrl { url = "/Camera1/?reservation_id=" + reservation_id, //append lab base url at the begining }; var javaScriptSerializer = new System.Web.Script.Serialization.JavaScriptSerializer(); string jsonString = javaScriptSerializer.Serialize(widget1); return jsonString; } else if (widget_name == "camera2") { widgetUrl widget2 = new widgetUrl { url = "/Camera2/?reservation_id=" + reservation_id, //append lab base url at the begining }; var javaScriptSerializer = new System.Web.Script.Serialization.JavaScriptSerializer(); string jsonString = javaScriptSerializer.Serialize(widget2); return jsonString; } return "widget not found"; }
//ROUTE: ../plugin/widget public static string getWidgetUrl(string widget_name, string reservation_id) { if (widget_name == "camera1") { widgetUrl widget1 = new widgetUrl { url = "/Camera1/?reservation_id=" + reservation_id, //append lab base url at the begining }; var javaScriptSerializer = new System.Web.Script.Serialization.JavaScriptSerializer(); string jsonString = javaScriptSerializer.Serialize(widget1); return(jsonString); } else if (widget_name == "camera2") { widgetUrl widget2 = new widgetUrl { url = "/Camera2/?reservation_id=" + reservation_id, //append lab base url at the begining }; var javaScriptSerializer = new System.Web.Script.Serialization.JavaScriptSerializer(); string jsonString = javaScriptSerializer.Serialize(widget2); return(jsonString); } return("widget not found"); }