Example #1
0
        /// <summary>
        /// Returns LIst of All Dataset with datasubset
        /// </summary>
        /// <param name="requestModel"></param>
        /// <returns></returns>
        #region GetAllDataSet
        public GetAllDataSetResponseModel GetAllDataSet(GetAllDataSetRequestModel requestModel)
        {
            GetAllDataSetResponseModel responseModel = new GetAllDataSetResponseModel();

            DataSetRepo dataSetRepo = new DataSetRepo();
            List<PharmaGuide.Repository.Repo.DataSetIdName> dataSet = dataSetRepo.GetAllDataSet(requestModel.AppId);

            if (dataSet == null)
            {
                responseModel.IsValid = false;
                return responseModel;
            }
            responseModel.CollectionOfDataSet = dataSet;


            responseModel.IsValid = true;
            return responseModel;
        }
        public HttpResponseMessage GetAllDataSet(int AppId)
        {

            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Invalid Request");
            }

            GetAllDataSetRequestModel requestModel = new GetAllDataSetRequestModel()
            {
                AppId = AppId
            };


            DataActions dataActions = new DataActions();
            GetAllDataSetResponseModel responseModel = dataActions.GetAllDataSet(requestModel);

            if (responseModel.Error != null)
            {
                return Request.CreateResponse(HttpStatusCode.OK, responseModel, "application/json");
            }

            return Request.CreateResponse(HttpStatusCode.OK, responseModel, "application/json");

        }
 public GetAllDataSetResponseModel GetAllDataSet(GetAllDataSetRequestModel requestModel)
 {
     DataCase datacase = new DataCase();
     return datacase.GetAllDataSet(requestModel);
 }