public HttpResponseMessage SaveServiceSolution(SaveServiceSolutionParameters model)
        {
            if (model == null)// Incase Post Object Is Null or Not Match and Object value is null
            {
                result = new ReponseMessage(MsgNo: HttpStatusCode.BadRequest.ToCode(), MsgType: MsgTypeEnum.E.ToString(), Message: "Object is null");
                return(Request.CreateResponse(HttpStatusCode.BadRequest, result));
            }
            if (ModelState.IsValid)
            {
                List <SaveAttachementDetailsParameters> _SaveAttachementDetailsParameters = ObfServices.SaveServiceSolutionSector(model);

                if (_SaveAttachementDetailsParameters != null)
                {
                    if (_SaveAttachementDetailsParameters.Count != 0)
                    {
                        return(Request.CreateResponse(HttpStatusCode.OK, JsonConvert.SerializeObject(_SaveAttachementDetailsParameters)));
                    }
                    else
                    {
                        result = new ReponseMessage(MsgNo: HttpStatusCode.BadRequest.ToCode(), MsgType: MsgTypeEnum.E.ToString(), Message: "Object is null");
                        return(Request.CreateResponse(HttpStatusCode.BadRequest, result));
                    }
                }
                else
                {
                    result = new ReponseMessage(MsgNo: HttpStatusCode.BadRequest.ToCode(), MsgType: MsgTypeEnum.E.ToString(), Message: "Object is null");
                    return(Request.CreateResponse(HttpStatusCode.BadRequest, result));
                }
            }

            return(null);
        }
Example #2
0
 public static List <SaveAttachementDetailsParameters> SaveServiceSolutionSector(SaveServiceSolutionParameters filter)
 {
     return(OBF_Creation.SaveServiceSolutionSector(filter));
 }