protected void submit_Click(object sender, EventArgs e)
        {
            int empid   = Convert.ToInt32(Textempid.Text);
            var empname = Textempname.Text;
            var emprole = Textemprole.Text;

            using (ReleasemanagamentdbEntities1 rmdb = new ReleasemanagamentdbEntities1())
            {
                rmdb.proc_add_employee(empid, empname, emprole);
                rmdb.SaveChanges();
                LabelMessage.Text = "Employee Added";
            }
        }
        protected void Addproject_Click(object sender, EventArgs e)
        {
            int    proj_id     = Convert.ToInt32(Textpid.Text);
            string proj_name   = Textpname.Text;
            string proj_status = Textpstatus.Text;
            string proj_type   = Textptype.Text;

            using (ReleasemanagamentdbEntities1 rmdb = new ReleasemanagamentdbEntities1())
            {
                rmdb.proc_add_project(proj_id, proj_name, proj_status, proj_type);
                rmdb.SaveChanges();
                Message.Text = "Project Added";
            }
        }
Exemplo n.º 3
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            int projid    = Convert.ToInt32(DropDownListpid.SelectedValue);
            var proj_name = DropDownListpname.SelectedValue;
            int TL_id     = Convert.ToInt32(DropDownListTLid.SelectedValue);
            var TL_name   = DropDownListtlname.SelectedValue;

            using (ReleasemanagamentdbEntities1 db = new ReleasemanagamentdbEntities1())
            {
                db.proc_Assign_Project(projid, proj_name, TL_id, TL_name);
                db.SaveChanges();
                Message.Text = "Project Assigned ";
            }
        }
        protected void LoginBtn_Click(object sender, EventArgs e)
        {
            List <proc_CheckLogin_Result> user = null;
            ReleasemanagamentdbEntities1  db   = new ReleasemanagamentdbEntities1();
            string username = Textboxuser.Text;
            string password = txtpassword.Text;

            user = db.proc_CheckLogin(username, password).ToList();
            if (user.Count > 0 && (user[0].role).Equals("manager"))
            {
                // Message.Text = "Valid User and the Role is " + user[0].role;
                //HttpCookie cookie = new HttpCookie("username");
                //cookie.Value = Textboxuser.Text;
                //Response.Cookies.Add(cookie);
                Session.Add("username", Textboxuser.Text);
                Response.Redirect("AddProject.aspx");
            }
            else
            {
                Message.Text = "Invalid User name or password";
            }
        }