public JsonResult GetUOMTypeName(string Prefix) { //Note : you can bind same list from database List <UOMType> ObjList = new List <UOMType>(); DA_UOMType daMT = new DA_UOMType(); ObjList = daMT.GetAllUOMTypes(); //Searching records from list using LINQ query var CityList = (from N in ObjList where N.Type.ToLower().Contains(Prefix.ToLower()) select new { N.Type, N.ID }); return(Json(CityList, JsonRequestBehavior.AllowGet)); }
public JsonResult GetUOMByMaterialGUID(string Prefix) { //Note : you can bind same list from database List <UOMType> ObjList = new List <UOMType>(); DA_UOMType daMT = new DA_UOMType(); ObjList = daMT.GetAllUOMTypes(); //Searching records from list using LINQ query var CityList = (from N in ObjList orderby N.Type select new { N.Type, N.ID }); return(Json(CityList, JsonRequestBehavior.AllowGet)); }
// GET: UOM public ActionResult UOMList(string GUID) { if (Session["UserInfo"] != null) { SystemUser userInfo = (SystemUser)Session["UserInfo"]; ViewBag.SystemUserType = userInfo.SystemUserType; mtdata = new DA_Material().GetAllMaterialByGUID(GUID); List <UOMType> umotyLst = new DA_UOMType().GetAllUOMTypes(); umotyLst.Add(new UOMType { GUID = "All", Type = "Choose Type", ID = 0 }); ViewBag.UOMTypeList = umotyLst.OrderBy(a => a.ID); return(PartialView("UOMList", mtdata)); } else { return(RedirectToAction("SessionTimeOut", "Error")); } }