Beispiel #1
0
        public HttpResponseMessage ViewJoinTable(HttpRequestMessage req, RP_ViewJoinTable rpViewJoinTable)
        {
            if (rpViewJoinTable != null)
            {
                RM_ViewJoinTable rmViewJoinTable = new RM_ViewJoinTable();
                List<RPR_ViewJoinTable> rprViewJoinTable = rmViewJoinTable.ViewJoinTable(rpViewJoinTable);

                if (rmViewJoinTable._IsSuccess)
                    return req.CreateResponse<List<RPR_ViewJoinTable>>(HttpStatusCode.Created, rprViewJoinTable);

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

            return req.CreateErrorResponse(HttpStatusCode.BadRequest, "Bad Request");
        }
Beispiel #2
0
        public List<RPR_ViewJoinTable> ViewJoinTable(RP_ViewJoinTable rpViewJoinTable)
        {
            this.SpName = "DigitalMenu_ViewJoinTable"; //Sp Name
                _IsSuccess = true;
                try
                {
                    SqlParameter[] param = new SqlParameter[3];
                    param[0] = new SqlParameter("@key", rpViewJoinTable.key);
                    param[1] = new SqlParameter("@WaitorId", rpViewJoinTable.WaiterId);
                    param[2] = new SqlParameter("@RestId", int.Parse(rpViewJoinTable.RestId));
                   // param[3] = new SqlParameter("@TableNumber",rpViewCurrentTableOrder.TableNumber);

                    ds = db.GetDataSet(this.SpName, param);
                    if (ds != null && ds.Tables.Count > 0)
                    {
                        rprViewJoinTable = SerializeData.SerializeMultiValue<RPR_ViewJoinTable>(ds.Tables[0]);
                    }
                }
                catch (Exception ex)
                {
                    _IsSuccess = false;
                    Logger.WriteLog(LogLevelL4N.ERROR, " View  Current Table Order | Exception : " + ex.Message);
                }
                return rprViewJoinTable;
        }