Scope :
Team crew management is similar to job portal management system developed in asp.net and sql server/ms access database.
There are two types of users.
- Normal users who can apply for teams and company admin who can create teams and recruit members.
- Users can register and login in the system. They can create and edit their profiles.
- Company admin can create team and recruit members.
- User can view teams and apply for teams.
- Company can search for users and users can search for various companies.
Module Description:
Registration :
This Page is used when user first time wants to use the system.user has to first register in to the system and then he/she can use the system.in this case, user has to provide his/her details like user name,first name,last name and password that user wants to use while using the system. Both company and normal user have to register to use the system
Login :
This Page is used when user has registered into the system and wants to use the system.
In this case, user has to provide valid user name and password .after providing valid user name and password,system allows user to use the system.
Create Profile :
Both company admin and user need to create their profiles after they login. User can view company’s details and apply for teams. Company can view user’s details and approve him for team.
Create Team:
Company admin create teams as per requirement. Details for team are provided. Number of members for team is also specified.
Apply For Team :
User can view various company and teams available. User can apply for any team if it has a vacancy.
Search:
User can search various companies,Teams and other user to get information
Data Dictionary
Output Screens:
- Registration
- Login
- User Homepage
- Company Homepage
- Add New Team
- Apply For Team
- Edit Team
- View User Details
- View Company Details
- View Team Details
- View Request Status
- Search Company
- Search User
- Change Password
- Company Usage History
- User History
[php]
View User Request for Team
using System;
using System.Web.Administration;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;</code>
namespace TeamCrewManagment
{
public partial class getuserReq : System.Web.UI.Page
{
string sql = null;
string constr = "Data Source=.\\SQLEXPRESS;AttachDbFilename=\\Team.mdf;Integrated Security=True;User Instance=True";
protected void Page_Load(object sender, EventArgs e)
{
try
{
sql = "select * from userreq where status like(‘Pending’)";
SqlConnection con = new SqlConnection(constr);
con.Open();
SqlCommand cmd = new SqlCommand(sql, con);
SqlDataReader dr = null;
dr = cmd.ExecuteReader();
//lbluserid.DataBinding = dr;
drplist.DataSource = dr;
drplist.DataTextField = "userid";
drplist.DataValueField = "userid";
drplist.DataBind();
con.Close();
// lbluserid.Text = dr.GetSqlString(0);
//lbluserid.;
}
catch (Exception er)
{
lbl4.Text = "1"+er.Message;
}
}
protected void drplist_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
sql = "select * from userreq where userid=’" + drplist.SelectedValue + "’";
SqlConnection con = new SqlConnection(constr);
con.Open();
SqlCommand cmd = new SqlCommand(sql, con);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
lbluserid.Text = ds.Tables[0].Rows[0].ItemArray[0].ToString();
txtSpeciality.Text = ds.Tables[0].Rows[0].ItemArray[1].ToString();
lblteamid.Text = ds.Tables[0].Rows[0].ItemArray[2].ToString();
Session["TT"] = lblteamid.Text;
con.Close();
}
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
string leader = null;
int memno = 0;
int cnt=0;
public void inc()
{
string qury = "select count(teamid) from teammem where teamid=’"+lblteamid.Text+"’";
sql = "select teammember from team where teamid=’" + lblteamid.Text + "’";
SqlConnection ssc = new SqlConnection(constr);
ssc.Open();
SqlCommand sscmd = new SqlCommand(sql, ssc);
SqlDataAdapter ssda = new SqlDataAdapter(sscmd);
DataSet ssds = new DataSet();
ssda.Fill(ssds);
memno = int.Parse(ssds.Tables[0].Rows[0].ItemArray[0].ToString());
sscmd = new SqlCommand(qury, ssc);
ssda = new SqlDataAdapter(sscmd);
ssds = new DataSet();
ssda.Fill(ssds);
cnt = int.Parse(ssds.Tables[0].Rows[0].ItemArray[0].ToString());
}
string up;
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
inc();
SqlConnection con;
SqlCommand cmd;
DataSet ds;
SqlDataAdapter da;
if (memno >= cnt)
{
try
{
if (RadioButtonList1.SelectedValue.Equals("Accept"))
{
up="update userreq set status=’"+RadioButtonList1.SelectedValue+"’ where userid=’"+lbluserid.Text+"’";
sql = "select teamleader from teammem where teamid=’" + lblteamid.Text + "’";
con = new SqlConnection(constr);
con.Open();
cmd = new SqlCommand(sql, con);
ds = new DataSet();
da = new SqlDataAdapter(cmd);
int cal = da.Fill(ds);
leader = ds.Tables[0].Rows[0].ItemArray[0].ToString();
if (cal > -1)
{
cmd = new SqlCommand(up, con);
ds = new DataSet();
da = new SqlDataAdapter(cmd);
da.Fill(ds);
insertData();
}
}
if (RadioButtonList1.SelectedIndex == 1)
{
con = new SqlConnection(constr);
con.Open();
up = "update userreq set status=’" + RadioButtonList1.SelectedValue + "’ where userid=’" + lbluserid.Text + "’";
cmd = new SqlCommand(up, con);
ds = new DataSet();
da = new SqlDataAdapter(cmd);
da.Fill(ds);
}
}
catch (Exception oo)
{
lbl4.Text = oo.Message;
}
}
else
{
RadioButtonList1.SelectedIndex = 1;
Label6.Visible = true;
Label6.Text = "Team is Overflowing";
}
}
public void insertData()
{
lbl4.Text = leader;
sql = "insert into [teammem] values (‘" + replaceSingleQuote(lblteamid.Text) + "’,’" + replaceSingleQuote(leader) + "’,’" + replaceSingleQuote(lbluserid.Text) + "’)";
SqlConnection scon = new SqlConnection(constr);
scon.Open();
SqlCommand scmd = new SqlCommand(sql, scon);
DataSet sds = new DataSet();
SqlDataAdapter sda = new SqlDataAdapter(scmd);
int ff=sda.Fill(sds);
if (ff > -1)
{
Response.Redirect("compHome.aspx");
}
}
public static String replaceSingleQuote(String fsQuote)
{
fsQuote = fsQuote.Trim();
int liStartingIndex = fsQuote.IndexOf("’", 0);
int liNextIndex = 0;
int liEvenIndex = 0;
while (liStartingIndex != -1)
{
liNextIndex = fsQuote.IndexOf("’", liStartingIndex + 1);
if (liNextIndex == -1 || liNextIndex != liStartingIndex + 1)
{ /*for qoute counted in bunch */
if (liEvenIndex % 2 == 0)
{ /* to insert single quote if quote count is odd */
fsQuote = fsQuote.Insert(liStartingIndex, "’");
}
liEvenIndex = 1;
}
if (liNextIndex == liStartingIndex + 1)
{ /* to increment value to be used at the time of inserting quote */
liEvenIndex++;
}
liStartingIndex = liNextIndex;
}
return fsQuote;
}
}
}
[/php]