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,46 +91,64 @@ 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();
|
||||||
int i = 0;
|
try
|
||||||
dt = DBProperty.getPropertyUnitTypeList(PropertyID);
|
|
||||||
if (dt.Rows.Count > 0)
|
|
||||||
{
|
{
|
||||||
for (i = 0; i <= dt.Rows.Count - 1; i++)
|
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
dt = DBProperty.getPropertyUnitTypeList(PropertyID);
|
||||||
|
|
||||||
|
|
||||||
|
if (dt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
oData.Add(new PropertyUnitTypesModel
|
for (i = 0; i <= dt.Rows.Count - 1; i++)
|
||||||
{
|
{
|
||||||
PropertyUnitTypeID = int.Parse(dt.Rows[i]["PropertyUnitTypeID"].ToString()),
|
oData.Add(new PropertyUnitTypesModel
|
||||||
PropertyUnitTypeName = (dt.Rows[i]["PropertyUnitTypeName"].ToString()),
|
{
|
||||||
|
PropertyUnitTypeID = int.Parse(dt.Rows[i]["PropertyUnitTypeID"].ToString()),
|
||||||
|
PropertyUnitTypeName = (dt.Rows[i]["PropertyUnitTypeName"].ToString()),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
oResponse.Status = "200";
|
||||||
|
oResponse.Message = "Success";
|
||||||
|
oResponse.Data = oData;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
oReponse.Status = "200";
|
oResponse.Status = "200";
|
||||||
oReponse.Message = "Success";
|
oResponse.Message = "No Records";
|
||||||
oReponse.Data = oData;
|
oResponse.Data = oData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
oReponse.Status = "200";
|
oResponse.Status = "500";
|
||||||
oReponse.Message = "No Records";
|
oResponse.Message = ex.Message;
|
||||||
oReponse.Data = oData;
|
oResponse.Data = oData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return oResponse;
|
||||||
return oReponse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("api/[controller]/GetPropertyBuildingNoList")]
|
[Route("api/[controller]/GetPropertyBuildingNoList")]
|
||||||
@@ -166,63 +189,77 @@ 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();
|
||||||
int i = 0;
|
|
||||||
dt = DBProperty.getPropertyUnitForBuildingNo(PropertyID, BuildingNo);
|
|
||||||
|
|
||||||
if (dt.Rows.Count > 0)
|
try
|
||||||
{
|
{
|
||||||
for (i = 0; i <= dt.Rows.Count - 1; i++)
|
|
||||||
|
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
dt = DBProperty.getPropertyUnitForBuildingNo(PropertyID, BuildingNo);
|
||||||
|
|
||||||
|
if (dt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
List<PropertyUnitUtilitiesModel> oPropertyUtils = new List<PropertyUnitUtilitiesModel>();
|
for (i = 0; i <= dt.Rows.Count - 1; i++)
|
||||||
|
|
||||||
oData.Add(new PropertyUnitsModel
|
|
||||||
{
|
{
|
||||||
PropertyUnitID = int.Parse(dt.Rows[i]["PropertyUnitID"].ToString()),
|
List<PropertyUnitUtilitiesModel> oPropertyUtils = new List<PropertyUnitUtilitiesModel>();
|
||||||
PropertyID = int.Parse(dt.Rows[i]["PropertyID"].ToString()),
|
|
||||||
PropertyUnitTypeID = int.Parse(dt.Rows[i]["PropertyUnitTypeID"].ToString()),
|
oData.Add(new PropertyUnitsModel
|
||||||
PropertyUnitType = dt.Rows[i]["PropertyUnitType"].ToString(),
|
{
|
||||||
UnitNo = dt.Rows[i]["UnitNo"].ToString(),
|
PropertyUnitID = int.Parse(dt.Rows[i]["PropertyUnitID"].ToString()),
|
||||||
UnitArea = decimal.Parse(dt.Rows[i]["UnitArea"].ToString()),
|
PropertyID = int.Parse(dt.Rows[i]["PropertyID"].ToString()),
|
||||||
UnitOpenArea = decimal.Parse(dt.Rows[i]["UnitOpenArea"].ToString()),
|
PropertyUnitTypeID = int.Parse(dt.Rows[i]["PropertyUnitTypeID"].ToString()),
|
||||||
BuildingNo = dt.Rows[i]["BuildingNo"].ToString(),
|
PropertyUnitType = dt.Rows[i]["PropertyUnitType"].ToString(),
|
||||||
ParkingNo = dt.Rows[i]["ParkingNo"].ToString(),
|
UnitNo = dt.Rows[i]["UnitNo"].ToString(),
|
||||||
NoofParkings = int.Parse(dt.Rows[i]["NoofParkings"].ToString()),
|
UnitArea = decimal.Parse(dt.Rows[i]["UnitArea"].ToString()),
|
||||||
ShareCertificateNos = dt.Rows[i]["ShareCertificateNos"].ToString(),
|
UnitOpenArea = decimal.Parse(dt.Rows[i]["UnitOpenArea"].ToString()),
|
||||||
CertificateNo = (dt.Rows[i]["CertificateNo"].ToString()),
|
BuildingNo = dt.Rows[i]["BuildingNo"].ToString(),
|
||||||
MemberID = int.Parse(dt.Rows[i]["MemberID"].ToString()),
|
ParkingNo = dt.Rows[i]["ParkingNo"].ToString(),
|
||||||
MemberName = dt.Rows[i]["MemberName"].ToString(),
|
NoofParkings = int.Parse(dt.Rows[i]["NoofParkings"].ToString()),
|
||||||
FirstOwnerName = dt.Rows[i]["FirstOwnerName"].ToString(),
|
ShareCertificateNos = dt.Rows[i]["ShareCertificateNos"].ToString(),
|
||||||
SecondOwnerName = dt.Rows[i]["SecondOwnerName"].ToString(),
|
CertificateNo = (dt.Rows[i]["CertificateNo"].ToString()),
|
||||||
NomineeName = dt.Rows[i]["NomineeName"].ToString(),
|
MemberID = int.Parse(dt.Rows[i]["MemberID"].ToString()),
|
||||||
OpeningBalance = decimal.Parse(dt.Rows[i]["OpeningBalance"].ToString()),
|
MemberName = dt.Rows[i]["MemberName"].ToString(),
|
||||||
RentedAmount = 0,
|
FirstOwnerName = dt.Rows[i]["FirstOwnerName"].ToString(),
|
||||||
PropertyUnitUtilities = oPropertyUtils
|
SecondOwnerName = dt.Rows[i]["SecondOwnerName"].ToString(),
|
||||||
|
NomineeName = dt.Rows[i]["NomineeName"].ToString(),
|
||||||
|
OpeningBalance = decimal.Parse(dt.Rows[i]["OpeningBalance"].ToString()),
|
||||||
|
RentedAmount = 0,
|
||||||
|
PropertyUnitUtilities = oPropertyUtils
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
oReponse.Status = "200";
|
||||||
|
oReponse.Message = "Success";
|
||||||
|
oReponse.Data = oData;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
oReponse.Status = "200";
|
oReponse.Status = "200";
|
||||||
oReponse.Message = "Success";
|
oReponse.Message = "No Records";
|
||||||
oReponse.Data = oData;
|
oReponse.Data = oData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
oReponse.Status = "200";
|
oReponse.Status = "200";
|
||||||
oReponse.Message = "No Records";
|
oReponse.Message = ex.Message;
|
||||||
oReponse.Data = oData;
|
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