Ejemplo n.º 1
0
        public HttpResponseMessage getprojectsbyuser(ProjectByUser input)
        {
            StringBuilder sblogs     = new StringBuilder();
            string        methodname = "getprojectsbyuser";

            try
            {
                //StringBuilder sblogs = new StringBuilder();
                sblogs.AppendLine("getprojectsbyuser start");
                ProjectUserwrapper root = new ProjectUserwrapper();
                root.root = input;
                var json = JsonConvert.SerializeObject(root, Formatting.Indented, new JsonSerializerSettings()
                {
                    DateFormatString = "yyyy-MM-ddThh:mm:ssZ"
                });
                sblogs.AppendLine("getprojectsbyuserid input : " + json);
                sblogs.AppendLine("db call started  : ");
                string result = getprojectsbyuser(json);
                sblogs.AppendLine("db call done  : ");
                objrm.Message = result;
                sblogs.AppendLine("data send to UI   : ");
                Logging.AddtoLogFile(sblogs.ToString(), methodname);
                return(Request.CreateResponse(HttpStatusCode.OK, objrm));
            }
            catch (Exception ex)
            {
                sblogs.AppendLine("exception   : " + ex.Message);
                Logging.AddtoLogFile(sblogs.ToString(), methodname + "_error");
                return(Request.CreateResponse(HttpStatusCode.OK, ex.Message));
            }
        }
Ejemplo n.º 2
0
        public HttpResponseMessage GetTrashedProjByUserId(ProjectByUser input)
        {
            ProjectUserwrapper root = new ProjectUserwrapper();

            root.root = input;
            var json = JsonConvert.SerializeObject(root, Formatting.Indented, new JsonSerializerSettings()
            {
                DateFormatString = "yyyy-MM-ddThh:mm:ssZ"
            });
            string result = TrashedProjDetailsByuserId(json);

            objrm.Message = result;
            return(Request.CreateResponse(HttpStatusCode.OK, objrm));
        }