Release - 1.0.0.9-2

Bill message api fix
This commit is contained in:
2023-05-21 22:26:08 +05:30
parent ab931f6099
commit a456abd1ec
9 changed files with 55 additions and 31 deletions
Binary file not shown.
@@ -36,7 +36,7 @@ namespace SocietyToolboxAPI.Controllers
UnitNo = (dt.Rows[i]["UnitNo"].ToString()), UnitNo = (dt.Rows[i]["UnitNo"].ToString()),
PropertyUnitType = dt.Rows[i]["PropertyUnitType"].ToString(), PropertyUnitType = dt.Rows[i]["PropertyUnitType"].ToString(),
MemberName = (dt.Rows[i]["MemberName"].ToString()), MemberName = (dt.Rows[i]["MemberName"].ToString()),
UnitArea= decimal.Parse(dt.Rows[i]["UnitArea"].ToString()), UnitArea = decimal.Parse(dt.Rows[i]["UnitArea"].ToString()),
UnitOpenArea = decimal.Parse(dt.Rows[i]["UnitOpenArea"].ToString()), UnitOpenArea = decimal.Parse(dt.Rows[i]["UnitOpenArea"].ToString()),
BuildingNo = (dt.Rows[i]["BuildingNo"].ToString()), BuildingNo = (dt.Rows[i]["BuildingNo"].ToString()),
ParkingNo = (dt.Rows[i]["ParkingNo"].ToString()), ParkingNo = (dt.Rows[i]["ParkingNo"].ToString()),
@@ -73,7 +73,7 @@ namespace SocietyToolboxAPI.Controllers
DataTable dt = new DataTable(); DataTable dt = new DataTable();
int i = 0; int i = 0;
dt = DBReports.GenerateMemberMonthBillDetails(PropertyID,BillMonth); dt = DBReports.GenerateMemberMonthBillDetails(PropertyID, BillMonth);
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++)
@@ -117,16 +117,19 @@ namespace SocietyToolboxAPI.Controllers
GenerateDemandbillMessages oReponse = new GenerateDemandbillMessages(); GenerateDemandbillMessages oReponse = new GenerateDemandbillMessages();
List<DeamndBillMessagesModel> oData = new List<DeamndBillMessagesModel>(); List<DeamndBillMessagesModel> oData = new List<DeamndBillMessagesModel>();
try
{
DataTable dt = new DataTable(); DataTable dt = new DataTable();
int i = 0; int i = 0;
dt = DBReports.GenerateMemberMonthBillDetails(PropertyID, BillMonth); dt = DBReports.GenerateDemandBillMessage(PropertyID, BillMonth);
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++)
{ {
oData.Add(new DeamndBillMessagesModel oData.Add(new DeamndBillMessagesModel
{ {
SNO = (dt.Rows[i]["SNO"].ToString()), SNO = (dt.Rows[i]["RNUM"].ToString()),
MobileNo = (dt.Rows[i]["MobileNo"].ToString()), MobileNo = (dt.Rows[i]["MobileNo"].ToString()),
DemandBillmessage = (dt.Rows[i]["DemandBillmessage"].ToString()), DemandBillmessage = (dt.Rows[i]["DemandBillmessage"].ToString()),
@@ -147,7 +150,13 @@ namespace SocietyToolboxAPI.Controllers
oReponse.Data = oData; oReponse.Data = oData;
} }
}
catch (Exception ex)
{
oReponse.Status = "500";
oReponse.Message = ex.Message;
oReponse.Data = oData;
}
return oReponse; return oReponse;
} }
+16
View File
@@ -41,6 +41,22 @@ namespace SocietyToolboxAPI.DBClass
dt = oLibDbCommon.GetDataTable("sp_generateMemberMonthlyBillDetails", parameterList, System.Data.CommandType.StoredProcedure); dt = oLibDbCommon.GetDataTable("sp_generateMemberMonthlyBillDetails", parameterList, System.Data.CommandType.StoredProcedure);
return dt;
}
public static DataTable GenerateDemandBillMessage(int pIntPropertyID, string pStrBillMonth)
{
var varConnectionString = DBConnectionLayer.getConnectionString();
DataTable dt = new DataTable();
oLibDbCommon.ConnectionString = varConnectionString;
List<SqlParameter> parameterList = new List<SqlParameter>();
parameterList.Add(oLibDbCommon.GetParameter("PropertyID", pIntPropertyID));
parameterList.Add(oLibDbCommon.GetParameter("Month", pStrBillMonth));
dt = oLibDbCommon.GetDataTable("sp_generateDemandBillMessages", parameterList, System.Data.CommandType.StoredProcedure);
return dt; return dt;
} }
-1
View File
@@ -54,6 +54,5 @@ namespace SocietyToolboxAPI.Models
public string MobileNo { get; set; } public string MobileNo { get; set; }
public string DemandBillmessage { get; set; } public string DemandBillmessage { get; set; }
} }
} }