Ejemplo n.º 1
0
        public void AddJobTool(JobTool jt)
        {
            using (SchedulerEntities db = new SchedulerEntities())
            {
                JOBTOOL JT = new JOBTOOL();
                JT.CreatedBy      = HttpContext.Current.User.Identity.Name;
                JT.LastModifiedBy = HttpContext.Current.User.Identity.Name;
                JT.CreationDate   = DateTime.Now;
                JT.ToolId         = jt.ToolId;
                JT.JobId          = jt.JobId;

                db.JOBTOOLs.Add(JT);
                db.SaveChanges();
            }
        }
Ejemplo n.º 2
0
        public ActionResult AssignTool(JobTool jw)
        {
            JobManager JM = new JobManager();

            if (ModelState.IsValid)
            {
                JM.AddJobTool(jw);
                return(null); //RedirectToAction("Welcome", "Home");
            }
            else
            {
                ModelState.AddModelError("", "The password provided is incorrect.");
            }

            return(View());
        }