Esempio n. 1
0
        public HttpResponseMessage CustomerCallWaiter(HttpRequestMessage req, RP_CustomerCallWaiter rpCustomerCallWaiter)
        {
            if (rpCustomerCallWaiter != null)
            {
            RM_CustomerCallWaiter rmCustomerCallWaiter = new RM_CustomerCallWaiter();
            List<RPR_CustomerCallWaiter> rprCustomerCallWaiter = rmCustomerCallWaiter.CustomerCallWaiter(rpCustomerCallWaiter);

            if (rmCustomerCallWaiter._IsSuccess)
            return req.CreateResponse<List<RPR_CustomerCallWaiter>>(HttpStatusCode.Created, rprCustomerCallWaiter);

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

            return req.CreateErrorResponse(HttpStatusCode.BadRequest, "Bad Request");
        }
Esempio n. 2
0
        // DataBase db = new DataBase();
        // DataSet ds = null;
        public List<RPR_CustomerCallWaiter> CustomerCallWaiter(RP_CustomerCallWaiter rpCustomerCallWaiter)
        {
            // this.SpName = "DigitalMenu_CustomerCallWaiter"; //Sp Name
            _IsSuccess = true;
            try
            {
                string status = GcmPushNotificationfn(rpCustomerCallWaiter.WaiterId, rpCustomerCallWaiter.NotificationMsg, rpCustomerCallWaiter.RestId, rpCustomerCallWaiter.TableNum);

                // used data set and data table

                DataTable Tables = new DataTable("call Waiter");
                Tables.Columns.Add("Status");
                Tables.Rows.Add(status);

                DataSet ds = new DataSet("dataset");
                ds.Tables.Add(Tables);

                rprCustomerCallWaiter = SerializeData.SerializeMultiValue<RPR_CustomerCallWaiter>(ds.Tables[0]);
                //   return rprCustomerCallWaiter;
            }
            catch (Exception ex)
            {
                _IsSuccess = false;
                Logger.WriteLog(LogLevelL4N.ERROR, " cus call Waiter  | Exception : " + ex.Message);
            }
            return rprCustomerCallWaiter;
        }