private DataTable objToDataTable(IEnumerable<tbClaimNote> obj)
{
DataTable dt = new DataTable();
tbClaimNote objmkt = new tbClaimNote();
dt.Columns.Add("Column_Name");
foreach (PropertyInfo info in typeof(tbClaimNote).GetProperties())
{
dt.Rows.Add(info.Name);
}
dt.AcceptChanges();
return dt;
}
[ActionName("ClaimstatusInfo")]
public DataTable ClaimstatusInfo([FromBody] tbClaimNoteView clmStinfo)
{
DataTable dt = CreateDataTable(typeof(tbClaimNote).GetProperties());
try
{
var result = BatchList(clmStinfo);
return objToDataTable(result);
}
catch (Exception ex)
{
var dr = dt.NewRow();
dr["ErrorCode"] = "";
dr["ErrorMessage"] = ex.Message;
dt.Rows.Add(dr);
return dt;
}
}
{
DataTable dt = new DataTable();
tbClaimNote objmkt = new tbClaimNote();
dt.Columns.Add("Column_Name");
foreach (PropertyInfo info in typeof(tbClaimNote).GetProperties())
{
dt.Rows.Add(info.Name);
}
dt.AcceptChanges();
return dt;
}
[ActionName("ClaimstatusInfo")]
public DataTable ClaimstatusInfo([FromBody] tbClaimNoteView clmStinfo)
{
DataTable dt = CreateDataTable(typeof(tbClaimNote).GetProperties());
try
{
var result = BatchList(clmStinfo);
return objToDataTable(result);
}
catch (Exception ex)
{
var dr = dt.NewRow();
dr["ErrorCode"] = "";
dr["ErrorMessage"] = ex.Message;
dt.Rows.Add(dr);
return dt;
}
}
No comments :
Post a Comment