Example #1
0
        public HttpResponseMessage InsertTempNote([FromBody]NotesModel model)
        {
            using (NotesTier mt = new NotesTier())
              {
              if (mt.InsertTempNotes(model))
                  return this.Request.CreateResponse(HttpStatusCode.OK);

              else
              {
                  return this.Request.CreateResponse(HttpStatusCode.BadRequest);
              }
              }
        }
Example #2
0
        public IQueryable<NotesModel> RetriveNotes(Int64 merchantId)
        {
            IList<NotesModel> notes;
            using (NotesTier mt = new NotesTier())
            {
                notes = mt.Retrieve(merchantId);

                //return this.Request.CreateResponse(HttpStatusCode.OK, notes);
                return notes.AsQueryable();

            }
            //DataSet  notes;
            //using (NotesTier mt = new NotesTier())
            //{
            //    notes = mt.RetrieveNotes(merchantId);
            //    if (notes.Tables[0].Rows.Count > 0)
            //    {
            //        return this.Request.CreateResponse(HttpStatusCode.OK,
            //            new List<NotesModel>(){
            //         new NotesModel()
            //        {
            //            //noteId = notes.Tables[0].Rows[0]["noteId"],
            //            //notetypeId = notes.Tables[0].Rows[0]["notetypeId"],
            //            merchantId = Convert.ToInt32(notes.Tables[0].Rows[0]["merchantId"]),
            //            contractId = Convert.ToInt32(notes.Tables[0].Rows[0]["contractId"]),
            //            note = Convert.ToString(notes.Tables[0].Rows[0]["note"]),
            //            workFlowId = Convert.ToInt32(notes.Tables[0].Rows[0]["workFlowId"]),
            //            screenName = Convert.ToString(notes.Tables[0].Rows[0]["screenName"])
            //        }});
            //    }
            //    else
            //    {
            //        return this.Request.CreateResponse(HttpStatusCode.OK);
            //    }

            //}
        }
Example #3
0
        public HttpResponseMessage RetriveTempNotes(Int64 merchantId)
        {
            IList<NotesModel> notes;
              using (NotesTier mt = new NotesTier())
              {
              notes = mt.RetrieveTempNotes(merchantId);

              return this.Request.CreateResponse(HttpStatusCode.OK, notes);

              }
        }