Пример #1
0
        public HttpResponseMessage CustomerOrderHistroy(HttpRequestMessage req, RP_CustomerOrderHistroy rpCustomerOrderHistroy)
        {
            if (rpCustomerOrderHistroy != null)
            {
                RM_CustomerOrderHistroy rmCustomerOrderHistroy = new RM_CustomerOrderHistroy();
                List<RPR_CustomerOrderHistroy> rprCustomerOrderHistroy = rmCustomerOrderHistroy.CustomerOrderHistroy(rpCustomerOrderHistroy);

                if (rmCustomerOrderHistroy._IsSuccess)
                    return req.CreateResponse<List<RPR_CustomerOrderHistroy>>(HttpStatusCode.Created, rprCustomerOrderHistroy);

                return req.CreateErrorResponse(HttpStatusCode.InternalServerError, "ServerError");
            }

            return req.CreateErrorResponse(HttpStatusCode.BadRequest, "Bad Request");
        }
Пример #2
0
 public List<RPR_CustomerOrderHistroy> CustomerOrderHistroy(RP_CustomerOrderHistroy rpCustomerOrderHistroy)
 {
     this.SpName = "DigitalMenu_CustomerOrderHistroy"; //Sp Name
     _IsSuccess = true;
     try
     {
         SqlParameter[] param = new SqlParameter[4];
         param[0] = new SqlParameter("@WaiterId", rpCustomerOrderHistroy.WaiterId);
         param[1] = new SqlParameter("@key", rpCustomerOrderHistroy.key);
         param[2] = new SqlParameter("@RestId", int.Parse(rpCustomerOrderHistroy.RestId));
         param[3] = new SqlParameter("@CusId", int.Parse(rpCustomerOrderHistroy.CusId));
         ds = db.GetDataSet(this.SpName, param);
         if (ds != null && ds.Tables.Count > 0)
         {
             rprCustomerOrderHistroy = SerializeData.SerializeMultiValue<RPR_CustomerOrderHistroy>(ds.Tables[0]);
             //NotifyCheckout(rpCustomerCheckout);
         }
     }
     catch (Exception ex)
     {
         _IsSuccess = false;
         Logger.WriteLog(LogLevelL4N.ERROR, " Customer order Histroy | Exception : " + ex.Message);
     }
     return rprCustomerOrderHistroy;
 }