Exemple #1
0
 public JsonResult ListDataCreate(string models)
 {
     JavaScriptSerializer jSerializer = new JavaScriptSerializer();
     IList<RouteObj> persons = new JavaScriptSerializer().Deserialize<IList<RouteObj>>(models);
     RouteObj temp = new RouteObj();
     foreach (RouteObj m in persons)
     {
         temp = new RouteObj { RouteID = 22, RouteName = m.RouteName, RouteBrief = m.RouteBrief, CreatedDate = System.DateTime.Now, ModifiedDate = System.DateTime.Now, IsActive = m.IsActive };
     }
     return Json(temp);
 }
Exemple #2
0
 public JsonResult ListDataUpdate(string models)
 {
     JavaScriptSerializer jSerializer = new JavaScriptSerializer();
     IList<RouteObj> persons = new JavaScriptSerializer().Deserialize<IList<RouteObj>>(models);
     RouteObj temp = new RouteObj();
     foreach (RouteObj m in persons)
     {
         temp = new RouteObj { RouteID = m.RouteID, RouteName = m.RouteName, RouteBrief = m.RouteBrief, CreatedDate = m.CreatedDate, ModifiedDate = m.ModifiedDate, IsActive = m.IsActive };
     }
     //return Json(publicationTable, JsonRequestBehavior.AllowGet); 
     return Json(temp);
 }