public ActionResult GeneralCall() { List <GeneralCall> CategoryList = new List <GeneralCall>(); Property p = new Property(); DataSet ds = new DataSet(); p.OnTable = "FetchGeneralCall"; ds = dl.FetchGeneralCall_sp(p); try { foreach (DataRow item in ds.Tables[0].Rows) { GeneralCall m = new GeneralCall(); m.PId = item["PId"].ToString(); m.PName = item["PName"].ToString(); m.Phone = item["Phone"].ToString(); m.Date = item["Date"].ToString(); m.NextDate = item["NextDate"].ToString(); m.CallType = item["CallType"].ToString(); m.Note = item["Note"].ToString(); m.CallDuration = item["CallDuration"].ToString(); m.AddedBy = item["AddedBy"].ToString(); m.IsActive = item["IsActive"].ToString(); CategoryList.Add(m); } ViewBag.CategoryList = CategoryList; } catch (Exception e) { } return(View()); }