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()),
PropertyUnitType = dt.Rows[i]["PropertyUnitType"].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()),
BuildingNo = (dt.Rows[i]["BuildingNo"].ToString()),
ParkingNo = (dt.Rows[i]["ParkingNo"].ToString()),
@@ -73,7 +73,7 @@ namespace SocietyToolboxAPI.Controllers
DataTable dt = new DataTable();
int i = 0;
dt = DBReports.GenerateMemberMonthBillDetails(PropertyID,BillMonth);
dt = DBReports.GenerateMemberMonthBillDetails(PropertyID, BillMonth);
if (dt.Rows.Count > 0)
{
for (i = 0; i <= dt.Rows.Count - 1; i++)
@@ -81,7 +81,7 @@ namespace SocietyToolboxAPI.Controllers
oData.Add(new MemberBillDetailsModel
{
BillNo = (dt.Rows[i]["BILLNO"].ToString()),
BillNo = (dt.Rows[i]["BILLNO"].ToString()),
BillDate = DateTime.Parse(dt.Rows[i]["BILLDATE"].ToString()).ToString("dd-MM-yyyy"),
UnitNo = (dt.Rows[i]["UnitNo"].ToString()),
MemberName = (dt.Rows[i]["MemberName"].ToString()),
@@ -117,37 +117,46 @@ namespace SocietyToolboxAPI.Controllers
GenerateDemandbillMessages oReponse = new GenerateDemandbillMessages();
List<DeamndBillMessagesModel> oData = new List<DeamndBillMessagesModel>();
DataTable dt = new DataTable();
int i = 0;
dt = DBReports.GenerateMemberMonthBillDetails(PropertyID, BillMonth);
if (dt.Rows.Count > 0)
try
{
for (i = 0; i <= dt.Rows.Count - 1; i++)
DataTable dt = new DataTable();
int i = 0;
dt = DBReports.GenerateDemandBillMessage(PropertyID, BillMonth);
if (dt.Rows.Count > 0)
{
oData.Add(new DeamndBillMessagesModel
for (i = 0; i <= dt.Rows.Count - 1; i++)
{
SNO = (dt.Rows[i]["SNO"].ToString()),
MobileNo = (dt.Rows[i]["MobileNo"].ToString()),
DemandBillmessage = (dt.Rows[i]["DemandBillmessage"].ToString()),
oData.Add(new DeamndBillMessagesModel
{
SNO = (dt.Rows[i]["RNUM"].ToString()),
MobileNo = (dt.Rows[i]["MobileNo"].ToString()),
DemandBillmessage = (dt.Rows[i]["DemandBillmessage"].ToString()),
});
});
}
oReponse.Status = "200";
oReponse.Message = "Success";
oReponse.Data = oData;
}
else
{
oReponse.Status = "200";
oReponse.Message = "Records 0";
oReponse.Data = oData;
}
oReponse.Status = "200";
oReponse.Message = "Success";
oReponse.Data = oData;
}
else
catch (Exception ex)
{
oReponse.Status = "200";
oReponse.Message = "Records 0";
oReponse.Status = "500";
oReponse.Message = ex.Message;
oReponse.Data = oData;
}
return oReponse;
}
+16
View File
@@ -41,6 +41,22 @@ namespace SocietyToolboxAPI.DBClass
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;
}
-1
View File
@@ -54,6 +54,5 @@ namespace SocietyToolboxAPI.Models
public string MobileNo { get; set; }
public string DemandBillmessage { get; set; }
}
}