Exemplo n.º 1
0
 public void FillResourceInfo(string resourceName)
 {
     using (QueryResource qr = new QueryResource())
     {
         Resource res = qr.GetResource(resourceName);
         if (res != null && res.ResourceProductionInfo != null)
         {
             txtResourceStatus.Text = res.ResourceProductionInfo.ResourceStatus.DisplayName;
             txtLastStatusChangeDate.Text = res.ResourceProductionInfo.LastStatusChangeDate.ToString();
         }
     }
 }
Exemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            using (QueryResource q = new QueryResource())
            {
                string query = context.Request["q"];
                string type = context.Request["type"];

                string[] resources;
                switch (type)
                {
                    case "all":
                    default:
                        resources = q.GetAllResourceNames(query);
                        break;
                }
                context.Response.ContentType = "text/plain";
                context.Response.Write(QueryContainer.GetStringWithNewLine(resources));
            }
        }