Example #1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            List <Proc_CheckLogin_Result> user = null;
            ReleaseManagementEntities     dbReleaseManagementObject = new ReleaseManagementEntities();
            string username = txtUsername.Text;
            string password = txtPassword.Text;

            user = dbReleaseManagementObject.Proc_CheckLogin(username, password).ToList();
            if (user.Count > 0)
            {
                string role = user[0].role;
                if (role == "manager")
                {
                    Response.Redirect("ManagerAddProject.aspx");
                }
                if (role == "teamlead")
                {
                    Response.Redirect("TeamLeadHomePage.aspx");
                }
                if (role == "developer")
                {
                    Response.Redirect("DeveloperHomePage.aspx");
                }
                if (role == "tester")
                {
                    Response.Redirect("TesterHomePage.aspx");
                }
            }
            else
            {
                lblMessage.Text = "Invalid Username or Password !! Please Try Again";
            }
        }
        protected void btnAddDeveloper_Click(object sender, EventArgs e)
        {
            string developerID   = txtDeveloperID.Text;
            string developerName = txtDeveloperName.Text;
            string gitHubLink    = txtGithubLink.Text;
            string teamID        = txtTeamID.Text;

            using (var addDeveloperItems = new ReleaseManagementEntities())
            {
                var addDeveloperID = new SqlParameter
                {
                    ParameterName = "@devid",
                    Value         = developerID
                };
                var addDeveloperName = new SqlParameter
                {
                    ParameterName = "@devname",
                    Value         = developerName
                };
                var addGitHubLink = new SqlParameter
                {
                    ParameterName = "@githublink",
                    Value         = gitHubLink
                };
                var addteamID = new SqlParameter
                {
                    ParameterName = "@teamid",
                    Value         = teamID
                };
                addDeveloperItems.Database.ExecuteSqlCommand("exec addDeveloper @devid,@devname,@githublink,@teamid", addDeveloperID, addDeveloperName, addGitHubLink, addteamID);
                lblAddDeveloperMessage.Text = "Developer Added Successfully";
            }
        }
        protected void btnAddTester_Click(object sender, EventArgs e)
        {
            string testerID     = txtTesterID.Text;
            string testerName   = txtTesterName.Text;
            string testerStatus = txtTesterStatus.Text;
            string teamID       = txtTeamID.Text;

            using (var addTesterItems = new ReleaseManagementEntities())
            {
                var addtesterID = new SqlParameter
                {
                    ParameterName = "@tid",
                    Value         = testerID
                };
                var addTesterName = new SqlParameter
                {
                    ParameterName = "@tname",
                    Value         = testerName
                };
                var addTesterStatus = new SqlParameter
                {
                    ParameterName = "@tstaus",
                    Value         = testerStatus
                };
                var addTeamID = new SqlParameter
                {
                    ParameterName = "@teamid",
                    Value         = teamID
                };
                addTesterItems.Database.ExecuteSqlCommand("exec addTester @tid,@tname,@tstaus,@teamid", addtesterID, addTesterName, addTesterStatus, addTeamID);
                lblAddTesterMessage.Text = "Tester Added Successfully";
            }
        }
        protected void btnAssignProject_Click(object sender, EventArgs e)
        {
            string teamID     = txtTeamID.Text;
            string teamName   = txtTeamName.Text;
            string projectID  = txtProjectID.Text;
            string teamleadID = txtTeamLeadID.Text;

            using (var assignProjectItems = new ReleaseManagementEntities())
            {
                var addTeamId = new SqlParameter
                {
                    ParameterName = "@teamid",
                    Value         = teamID
                };
                var addteamName = new SqlParameter
                {
                    ParameterName = "@teamname",
                    Value         = teamName
                };
                var addProjectID = new SqlParameter
                {
                    ParameterName = "@pid",
                    Value         = projectID
                };
                var addProjectTeamleadID = new SqlParameter
                {
                    ParameterName = "@teamleadid",
                    Value         = teamleadID
                };
                var addProjectQuery = assignProjectItems.Database.ExecuteSqlCommand("exec assignProjectToTL @teamid,@teamname,@pid,@pid", addTeamId, addteamName, addProjectID, addProjectTeamleadID);
                lblAssignProjectMessage.Text = "Project Assigned to Teamlead Successfully";
            }
        }
Example #5
0
        protected void btnAddProject_Click(object sender, EventArgs e)
        {
            string projectID           = txtProjectId.Text;
            string projectName         = txtProjectName.Text;
            string projectDescription  = txtProjectDescription.Text;
            string projectRequirements = txtProjectRequirements.Text;
            string projectStatus       = txtProjectStatus.Text;

            using (var addProjectItems = new ReleaseManagementEntities())
            {
                var addProjectId = new SqlParameter
                {
                    ParameterName = "@pid",
                    Value         = projectID
                };
                var addProjectName = new SqlParameter
                {
                    ParameterName = "@pname",
                    Value         = projectName
                };
                var addProjectDescription = new SqlParameter
                {
                    ParameterName = "@pdesc",
                    Value         = projectDescription
                };
                var addProjectRequirements = new SqlParameter
                {
                    ParameterName = "@preq",
                    Value         = projectRequirements
                };
                var addProjectStatus = new SqlParameter
                {
                    ParameterName = "@pstatus",
                    Value         = projectStatus
                };
                var addProjectQuery = addProjectItems.Database.ExecuteSqlCommand("exec InsertProjectProd @pid,@pname,@pdesc,@preq,@pstatus", addProjectId, addProjectName, addProjectDescription, addProjectRequirements, addProjectStatus);
                lblAddProjMessage.Text = "Project Added Successfully";
            }
        }