Property Controller - Endpoing error logg
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -25,6 +25,11 @@ namespace SocietyToolboxAPI.Controllers
|
|||||||
|
|
||||||
DataTable dt = new DataTable();
|
DataTable dt = new DataTable();
|
||||||
DataTable dtUtils = new DataTable();
|
DataTable dtUtils = new DataTable();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
dt = DBProperty.getPropertyUnitList(PropertyID, PropertyUnitID);
|
dt = DBProperty.getPropertyUnitList(PropertyID, PropertyUnitID);
|
||||||
dtUtils = DBProperty.getPropertyUnilDetails(PropertyUnitID);
|
dtUtils = DBProperty.getPropertyUnilDetails(PropertyUnitID);
|
||||||
@@ -86,20 +91,31 @@ namespace SocietyToolboxAPI.Controllers
|
|||||||
oReponse.Data = oData;
|
oReponse.Data = oData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
oReponse.Status = "200";
|
||||||
|
oReponse.Message = ex.Message;
|
||||||
|
oReponse.Data = oData;
|
||||||
|
}
|
||||||
return oReponse;
|
return oReponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("api/[controller]/GetPropertyUnitTypeList")]
|
[Route("api/[controller]/GetPropertyUnitTypeList")]
|
||||||
[HttpGet()]
|
[HttpGet]
|
||||||
public GetPropertyUnitTypeList GetPropertyUnitTypeList([FromQuery]int PropertyID)
|
public GetPropertyUnitTypeList GetPropertyUnitTypeList([FromQuery]int PropertyID)
|
||||||
{
|
{
|
||||||
GetPropertyUnitTypeList oReponse = new GetPropertyUnitTypeList();
|
GetPropertyUnitTypeList oResponse = new GetPropertyUnitTypeList();
|
||||||
List<PropertyUnitTypesModel> oData = new List<PropertyUnitTypesModel>();
|
List<PropertyUnitTypesModel> oData = new List<PropertyUnitTypesModel>();
|
||||||
|
|
||||||
DataTable dt = new DataTable();
|
DataTable dt = new DataTable();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
dt = DBProperty.getPropertyUnitTypeList(PropertyID);
|
dt = DBProperty.getPropertyUnitTypeList(PropertyID);
|
||||||
|
|
||||||
|
|
||||||
if (dt.Rows.Count > 0)
|
if (dt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
for (i = 0; i <= dt.Rows.Count - 1; i++)
|
for (i = 0; i <= dt.Rows.Count - 1; i++)
|
||||||
@@ -112,20 +128,27 @@ namespace SocietyToolboxAPI.Controllers
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
oReponse.Status = "200";
|
oResponse.Status = "200";
|
||||||
oReponse.Message = "Success";
|
oResponse.Message = "Success";
|
||||||
oReponse.Data = oData;
|
oResponse.Data = oData;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
oReponse.Status = "200";
|
oResponse.Status = "200";
|
||||||
oReponse.Message = "No Records";
|
oResponse.Message = "No Records";
|
||||||
oReponse.Data = oData;
|
oResponse.Data = oData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
oResponse.Status = "500";
|
||||||
|
oResponse.Message = ex.Message;
|
||||||
|
oResponse.Data = oData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return oResponse;
|
||||||
return oReponse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("api/[controller]/GetPropertyBuildingNoList")]
|
[Route("api/[controller]/GetPropertyBuildingNoList")]
|
||||||
@@ -166,14 +189,21 @@ namespace SocietyToolboxAPI.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Route("api/[controller]/GetPropertyUnitsForBuildingNo")]
|
[Route("api/[controller]/GetPropertyUnitsForBuildingNo")]
|
||||||
[HttpGet()]
|
[HttpGet]
|
||||||
public GetPropertyUnitList GetPropertyUnitsForBuildingNo([FromQuery]int PropertyID, [FromQuery]string BuildingNo)
|
public GetPropertyUnitList GetPropertyUnitsForBuildingNo([FromQuery]int PropertyID, [FromQuery]string BuildingNo)
|
||||||
{
|
{
|
||||||
GetPropertyUnitList oReponse = new GetPropertyUnitList();
|
GetPropertyUnitList oReponse = new GetPropertyUnitList();
|
||||||
List<PropertyUnitsModel> oData = new List<PropertyUnitsModel>();
|
List<PropertyUnitsModel> oData = new List<PropertyUnitsModel>();
|
||||||
|
|
||||||
|
|
||||||
DataTable dt = new DataTable();
|
DataTable dt = new DataTable();
|
||||||
DataTable dtUtils = new DataTable();
|
DataTable dtUtils = new DataTable();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
dt = DBProperty.getPropertyUnitForBuildingNo(PropertyID, BuildingNo);
|
dt = DBProperty.getPropertyUnitForBuildingNo(PropertyID, BuildingNo);
|
||||||
|
|
||||||
@@ -222,7 +252,14 @@ namespace SocietyToolboxAPI.Controllers
|
|||||||
oReponse.Message = "No Records";
|
oReponse.Message = "No Records";
|
||||||
oReponse.Data = oData;
|
oReponse.Data = oData;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
oReponse.Status = "200";
|
||||||
|
oReponse.Message = ex.Message;
|
||||||
|
oReponse.Data = oData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return oReponse;
|
return oReponse;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user