예제 #1
0
        public HttpResponseMessage CheckJoinStatus(HttpRequestMessage req, RP_CheckJoinStatus rpCheckJoinStatus)
        {
            if (rpCheckJoinStatus != null)
            {
            RM_CheckJoinStatus rmCheckJoinStatus = new RM_CheckJoinStatus();
            List<RPR_CheckJoinStatus> rprCheckJoinStatus = rmCheckJoinStatus.CheckJoinStatus(rpCheckJoinStatus);

            if (rmCheckJoinStatus._IsSuccess)
            return req.CreateResponse<List<RPR_CheckJoinStatus>>(HttpStatusCode.Created, rprCheckJoinStatus);

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

            return req.CreateErrorResponse(HttpStatusCode.BadRequest, "Bad Request");
        }
예제 #2
0
        public List<RPR_CheckJoinStatus> CheckJoinStatus(RP_CheckJoinStatus rpCheckJoinStatus)
        {
            this.SpName = "DigitalMenu_CheckJoinTableStatus"; //Sp Name
            _IsSuccess = true;
            try
            {
                SqlParameter[] param = new SqlParameter[4];
                param[0] = new SqlParameter("@TableNumber", int.Parse(rpCheckJoinStatus.TableNumber));
                param[1] = new SqlParameter("@RestId", int.Parse(rpCheckJoinStatus.RestId));
                param[2] = new SqlParameter("@key", rpCheckJoinStatus.key);
                param[3] = new SqlParameter("@Mobile", rpCheckJoinStatus.Mobile);

                ds = db.GetDataSet(this.SpName, param);
                if (ds != null && ds.Tables.Count > 0)
                {
                    rprCheckJoinStatus = SerializeData.SerializeMultiValue<RPR_CheckJoinStatus>(ds.Tables[0]);
                }
            }
            catch (Exception ex)
            {
                _IsSuccess = false;
                Logger.WriteLog(LogLevelL4N.ERROR, " Check Join Status  | Exception : " + ex.Message);
            }
            return rprCheckJoinStatus;
        }