Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
If you ONLY want to have 1 form data, you need filter formInfo. Example:
formsInfo = formsInfo.Where(f =>f.Name.Equals("ContactUs"))
Then call _formDataRepository.GetSubmissionData to get its data.
Hi Guys,
I created Registration and contactus form,both forms data saved in tblBigTable.Now i want to retrieve only registration form data,but my logic will retriev all the forms data,here is the code.
public class LoadformdataController : PageController submittedData; _formRepository;
{
List
private Injected
DataTable dt = new DataTable();
public ActionResult Index(Loadformdata currentPage)
{
DataTable dt = new DataTable();
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("Number", typeof(string));
dt.Columns.Add("Mail", typeof(string));
dt.Columns.Add("Gender", typeof(string));
FormDataRepository _formDataRepository = new FormDataRepository();
var formsInfo = _formRepository.Service.GetFormsInfo(null);
foreach (var info in formsInfo)
{
submittedData = _formDataRepository.GetSubmissionData(
new FormIdentity(info.FormGuid,currentPage.Language.Name),
DateTime.Now.AddDays(-100),
DateTime.Now).ToList();
List li = new List();
}
return View(currentPage);
}
}
The above code retriev all forms data,Can anyone help me out of this.
Thanks,
Kartheek