// GET: Resource/Create public ActionResult Create() { ResourceModel rm = new ResourceModel(); rm.Profiles = rs.GetMany().Select(c => new SelectListItem { Text = c.Name, Value = c.ProfileT.ToString(), }); return(View(rm)); }
public ActionResult CreateMandat() { MandatModel pm = new MandatModel(); pm.Ressources = sr.GetMany().Select(m => new SelectListItem { Text = m.Name, Value = m.Id.ToString() }); return(View(pm)); }
// GET: Table public ActionResult Table(string search, int?i) { var Ressource = rs.GetMany(p => p.Email.Contains(search) || p.UserName.Contains(search) || p.ProfileT.Contains(search) || p.Seniority.Contains(search) ); return(View(Ressource.ToList().ToPagedList(i ?? 1, 3))); }
public ActionResult GetData() { //var Ress = db.GetMany().Where(x => x.AccountType == "Ressource" ); var Ressources = sr.GetMany().ToList(); var emp = Ressources.Where(x => x.typec.ToString() == "Employee").Count(); var pig = Ressources.Where(x => x.typec.ToString() == "Freelancer").Count(); Ratio obj = new Ratio(); obj.pig = pig; obj.emp = emp; return(Json(obj, JsonRequestBehavior.AllowGet)); }