Ejemplo n.º 1
0
        public ActionResult AddEditTache(int IdTache)
        {
            Os = new OrganizerService();
            Ts = new TacheService();
            var orgservice = Os.ListOrganizers();
            List <OrganizerModelView> lorg = new List <OrganizerModelView>();

            foreach (var item in orgservice)
            {
                OrganizerModelView org = new OrganizerModelView();
                org.Id        = item.Id;
                org.FirstName = item.FirstName;
                org.LastName  = item.LastName;

                org.Password             = item.Password;
                org.Email                = item.Email;
                org.EmailConfirmed       = item.EmailConfirmed;
                org.PasswordHash         = item.PasswordHash;
                org.PhoneNumber          = item.PhoneNumber;
                org.PhoneNumberConfirmed = item.PhoneNumberConfirmed;
                org.TwoFactorEnabled     = item.TwoFactorEnabled;
                org.LockoutEndDateUtc    = item.LockoutEndDateUtc;
                org.LockoutEnabled       = item.LockoutEnabled;
                org.AccessFailedCount    = item.AccessFailedCount;
                org.UserName             = item.UserName;
                // org.Roles = item.Roles;
                org.SecurityStamp = item.SecurityStamp;

                lorg.Add(org);
            }
            ViewData["Organ"]        = new SelectList(lorg, "Id", "FirstName");
            ViewBag.OrganisateurList = new SelectList(lorg, "OragnisateurFk", "FirstName");
            TacheModelView model = new TacheModelView();
            // EmployeeViewModel model = new EmployeeViewModel();
            Tache t = new Tache();

            if (IdTache > 0)
            {
                t = Ts.GetById(IdTache);
                //t = Ts.Get(x => x.IdTache == model.IdTache && x.IsDeleted == false);

                model.EtatdeTache    = (EventManage.Models.EtatTache)t.EtatdeTache;
                model.Nom            = (EventManage.Models.NomTache)t.Nom;
                model.OragnisateurFk = t.OragnisateurFk;
                model.DescTache      = t.DescTache;
                model.DeadlineTache  = t.DeadlineTache;
            }
            return(PartialView("Partial2", model));
        }
Ejemplo n.º 2
0
        // GET: Tache/Details/5
        public ActionResult Details(int id)
        {
            Ts = new TacheService();
            TacheModelView dvm  = new TacheModelView();
            var            item = Ts.GetById(id);



            dvm.IdTache = item.IdTache;
            dvm.Nom     = (EventManage.Models.NomTache)item.Nom;

            dvm.DescTache = item.DescTache;


            dvm.DeadlineTache = item.DeadlineTache;
            dvm.EtatdeTache   = (EventManage.Models.EtatTache)item.EtatdeTache;


            return(View(dvm));
        }
Ejemplo n.º 3
0
 // GET: api/TacheAPI/5
 public Tache Get(int id)
 {
     return(ts.GetById(id));
 }