public async Task <IActionResult> Putmanagement(int id, management management)
        {
            if (id != management.Id)
            {
                return(BadRequest());
            }

            _context.Entry(management).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!managementExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemplo n.º 2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string userText = string.Format("{0}", Request.Form["user"]);
            string passText = string.Format("{0}", Request.Form["pass"]);

            Kanban_board_project.management mm = new management();
            management mg = new management();

            if (mg.yaExiste(userText, passText))
            {
                Session["user"] = userText;
                Response.Redirect("Dashboard.aspx");
            }
            else
            {
                if (!mg.yaExisteUser(userText))
                {
                    Application["LblUser"] = "******";
                }
                else
                {
                    Application["TxtUser"] = userText;
                    Application["LblPass"] = "******";
                }

                Response.Redirect("main.aspx");
            }
        }
        public async Task <ActionResult <management> > Postmanagement(management management)
        {
            _context.management.Add(management);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("Getmanagement", new { id = management.Id }, management));
        }
Exemplo n.º 4
0
 public JsonResult ManagmentAutoComplete(string searchTerm)
 {
     try
     {
         Managements managements    = new Managements();
         var         managementName = (from Managements in managements.GetManagements()
                                       where Managements.name.StartsWith(searchTerm)
                                       select new
         {
             label = Managements.name,
             val = Managements.id
         }).ToList();
         if (managementName.Count > 0)
         {
             return(Json(managementName, JsonRequestBehavior.AllowGet));
         }
         else
         {
             management manageterm = new management();
             manageterm.name    = searchTerm;
             manageterm.agnetid = 3;
             managements.AddManagement(manageterm);
             return(null);
         }
     }
     catch (Exception ex)
     {
         //handling exception
         throw ex;
     }
 }
Exemplo n.º 5
0
        public ActionResult DeleteConfirmed(int id)
        {
            management management = db.managements.Find(id);

            db.managements.Remove(management);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "id,roomno,products,productmodel,available")] management management)
 {
     if (ModelState.IsValid)
     {
         db.Entry(management).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(management));
 }
Exemplo n.º 7
0
        public ActionResult Create([Bind(Include = "id,roomno,products,productmodel,available")] management management)
        {
            if (ModelState.IsValid)
            {
                db.managements.Add(management);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(management));
        }
Exemplo n.º 8
0
        // GET: Manage/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            management management = db.managements.Find(id);

            if (management == null)
            {
                return(HttpNotFound());
            }
            return(View(management));
        }
Exemplo n.º 9
0
    private void OnEnable()
    {
        manage          = GameObject.FindGameObjectWithTag("select").GetComponent <management>();
        slider.maxValue = initial_life;
        myselect        = null;
        GameObject[] select = GameObject.FindGameObjectsWithTag("select");
        int          i;

        for (i = 0; i < select.Length; i++)
        {
            if (select[i].layer == gameObject.layer)
            {
                myselect = select[i];
                break;
            }
        }
        click = this.gameObject.GetComponent <ClickToMove>();
        if (myselect && click)
        {
            myselect.GetComponent <Select>().alltanks.Add(click);
        }
    }
Exemplo n.º 10
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            management mg = new management();

            if (!mg.yaExiste(this.TextBox1.Text, this.TextBox2.Text))
            {
                Response.Redirect("WebForm1.aspx");
            }

            /*
             * CheckingEmailAddress.EmailVerify Verifier = new CheckingEmailAddress.EmailVerify();
             * CheckingEmailAddress.ReturnValues WithoutTimeOut = Verifier.VerifyEmail(this.TextBox1.Text, "0");
             * CheckingEmailAddress.ReturnValues WithTimeOut = Verifier.VerifyEmailWithTimeout(this.TextBox1.Text, "5", "0");
             *
             * String info = "";
             * info += WithoutTimeOut.ValidLicenseKey.ToString();
             * info += "\n";
             * info += WithoutTimeOut.CorrectSyntax.ToString();
             * info += "\n";
             * info += WithoutTimeOut.GoodEmail.ToString();
             *
             * Response.Write(info);
             */
        }
Exemplo n.º 11
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (code.Value.CompareTo(Session["CaptchaImageText"].ToString()) != 0)
            {
                Application["LblImage"] = " Código incorrecto";
                Application["Name"]     = string.Format("{0}", Request.Form["name"]);
                Application["Email"]    = string.Format("{0}", Request.Form["email"]);
                Application["User"]     = string.Format("{0}", Request.Form["user"]);
                Response.Redirect("register.aspx");
                return;
            }

            management mg = new management();

            string userText  = string.Format("{0}", Request.Form["user"]);
            string passText  = string.Format("{0}", Request.Form["pass"]);
            string emailText = string.Format("{0}", Request.Form["email"]);

            Int32 Validation = mg.emailIsValid(emailText);

            if (Validation != 0)
            {
                Application["Name"]  = string.Format("{0}", Request.Form["name"]);
                Application["Email"] = string.Format("{0}", Request.Form["email"]);
                Application["User"]  = string.Format("{0}", Request.Form["user"]);

                if (Validation == 1)
                {
                    Application["LblEmail"] = " Sintaxis de correo errónea";
                }

                if (Validation == 2)
                {
                    Application["LblEmail"] = " Dominio no encontrado";
                }

                if (Validation == 3)
                {
                    Application["LblEmail"] = " Correo Electrónico no disponible";
                }

                Response.Redirect("register.aspx");
                return;
            }

            if (mg.correoRegistrado(emailText))
            {
                Application["LblEmail"] = " Este correo ya esta en uso";
                Application["Name"]     = string.Format("{0}", Request.Form["name"]);
                Application["Email"]    = string.Format("{0}", Request.Form["email"]);
                Application["User"]     = string.Format("{0}", Request.Form["user"]);
                Response.Redirect("register.aspx");
                return;
            }

            if (mg.yaExisteUser(userText))
            {
                Application["LblUser"] = "******";
                Application["Name"]    = string.Format("{0}", Request.Form["name"]);
                Application["Email"]   = string.Format("{0}", Request.Form["email"]);
                Application["User"]    = string.Format("{0}", Request.Form["user"]);
                Response.Redirect("register.aspx");
                return;
            }
            else
            {
                string nameText = string.Format("{0}", Request.Form["name"]);
                string profText = DropDownList1.SelectedValue;
                try
                {
                    mg.insertingRecord(nameText, profText, emailText, userText, passText);
                    mg.sendActivationMessage(emailText, nameText, "*****@*****.**", "ramirezcruz2013");
                    Response.Redirect("Dashboard.aspx");
                }
                catch (Exception)
                {
                    Application["LblUser"] = "******";
                    Application["Name"]    = string.Format("{0}", Request.Form["name"]);
                    Application["Email"]   = string.Format("{0}", Request.Form["email"]);
                    Application["User"]    = string.Format("{0}", Request.Form["user"]);
                }
            }
        }