public HttpResponseMessage SubmitOBF(SubmitOBFParameters 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.submit_dh_headers(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);
        }
Exemple #2
0
 public static List <SaveAttachementDetailsParameters> submit_dh_headers(SubmitOBFParameters filter)
 {
     return(OBF_Creation.submit_dh_headers(filter));
 }