public override void WriteData(HttpContext context)
        {
            string strData = "-1";

            if ((context.Request["RequestServicesID"] != null) && (context.Request["Status"] != ""))
            {
                string strRequestServicesID = context.Request["RequestServicesID"];
                int    iRequestServicesID   = -1;
                int    iStatus = int.Parse(context.Request["Status"]);
                if (int.TryParse(strRequestServicesID, out iRequestServicesID))
                {
                    RequestServices.UpdateStatus(iRequestServicesID, iStatus);
                    //strData = "1";
                }
            }
        }
Exemplo n.º 2
0
        public override void WriteData()
        {
            string strData = "-1";

            if ((Request.QueryString["RequestServicesID"] != null) && (Request.QueryString["Status"] != ""))
            {
                string strRequestServicesID = Request.QueryString["RequestServicesID"];
                int    iRequestServicesID   = -1;
                int    iStatus = int.Parse(Request.QueryString["Status"]);
                if (int.TryParse(strRequestServicesID, out iRequestServicesID))
                {
                    RequestServices.UpdateStatus(iRequestServicesID, iStatus);
                    strData = "1";
                }
            }
            Response.Clear();
            Response.ContentType = "text/plain";
            Response.Write(strData);
        }
        public override void WriteData(HttpContext context)
        {
            string strData = "";

            if ((context.Request["RequestServicesID"] != null) && (context.Request["Status"] != ""))
            {
                string strRequestServicesID = context.Request["RequestServicesID"];
                int    iRequestServicesID   = -1;
                int    iStatus = int.Parse(context.Request["Status"]);
                if (int.TryParse(strRequestServicesID, out iRequestServicesID))
                {
                    DataTable objDSDetail = RequestServices.GetDetail(iRequestServicesID, iStatus);
                    //strData = JsonConvert.SerializeObject(objDSDetail, Formatting.Indented);
                    strData = objDSDetail.DataSet.GetXml();
                }
            }
            context.Response.ContentType = "text/xml";
            context.Response.Write(strData);
            context.Response.End();
        }