Example #1
0
        public DropDownResponse GetPlantList()
        {
            DropDownResponse response = new DropDownResponse();

            try
            {
                var list = new EntityCall.MasterRepository(_Companyinformation).GetPlantList();
                if (list != null)
                {
                    string str = Newtonsoft.Json.JsonConvert.SerializeObject(list);
                    response.Data = Newtonsoft.Json.JsonConvert.DeserializeObject <List <DropDownValue> >(str);
                }
                else
                {
                    throw new Exception("No Data Available in Place List");
                }
            }
            catch (Exception ex)
            {
                //var errorRequest = "authenticatedCustomerId:" + customerId;
                //response = Response.Failed(response, ex, errorRequest, MethodBase.GetCurrentMethod().Name, _companyinfo.PrivateConnectionString, _companyinfo.CompanyID);
            }

            return(response);
        }
Example #2
0
        public MasterPlaceModelResponse GetMasterPlaceList()
        {
            MasterPlaceModelResponse response = new MasterPlaceModelResponse();

            try
            {
                var list = new EntityCall.MasterRepository(_Companyinformation).GetPlaceList();
                if (list != null)
                {
                    string str = Newtonsoft.Json.JsonConvert.SerializeObject(list);
                    response.Data = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Master_TblMstPlaceModel> >(str);
                }
                else
                {
                    throw new Exception("No Data Available in Place List");
                }
                //DataTable dt = new SQLDAL.Master(_Companyinformation).GetMasterDistricts(_Companyinformation.PrivateConnectionString, _Companyinformation.CompanyID, string.Empty);
                //if (dt.IsValid())
                //{
                //    //Logic Put Here for Conversion or Mapping
                //    response.Data = dt;
                //}
            }
            catch (Exception ex)
            {
                //var errorRequest = "authenticatedCustomerId:" + customerId;
                //response = Response.Failed(response, ex, errorRequest, MethodBase.GetCurrentMethod().Name, _companyinfo.PrivateConnectionString, _companyinfo.CompanyID);
            }
            return(response);
        }