Esempio n. 1
0
        public async Task <IActionResult> insertfeedbacktoStore(string storeid, int customerid, string comment, string rating)
        {
            //var paramter = new DynamicParameters();
            //paramter.Add("@customerid", customerid);
            //paramter.Add("@deliveryboyid", deliveryboyid);
            //paramter.Add("@comment", comment);
            //paramter.Add("@rating", rating );

            // _ISP_Call.Execute("insertfeedback", paramter);
            customerfeedback obj = new customerfeedback();

            obj.id              = 0;
            obj.fromcustomerid  = customerid;
            obj.toDeliveryboyid = null;
            obj.toStoredid      = storeid;
            obj.comment         = comment;
            obj.rating          = rating;
            obj.isdeleted       = false;
            obj.isactive        = false;
            int id = await _customerfeedbackServices.CreateAsync(obj);

            if (id == null)
            {
                string myJson = "{\"Message\": " + "\"NotFound\"" + "}";
                return(NotFound(myJson));
            }
            else
            {
                string myJson = "{\"Message\": " + "\"Feedback Insert Successfully\"" + "}";
                return(Ok(myJson));
            }
            //return BadRequest();
        }
Esempio n. 2
0
        public async Task <int> CreateAsync(customerfeedback obj)
        {
            await _context.customerfeedback.AddAsync(obj);

            await _context.SaveChangesAsync();

            return(obj.id);
        }
Esempio n. 3
0
 public async Task UpdateAsync(customerfeedback obj)
 {
     _context.customerfeedback.Update(obj);
     await _context.SaveChangesAsync();
 }