protected void Button1_Click(object sender, EventArgs e) { managerreq mr = new managerreq(); mr.mgrname = Label2.Text; mr.desig = TextBox1.Text; mr.prjname = TextBox2.Text; mr.period = Convert.ToInt32(TextBox3.Text); mr.noofvacancies = Convert.ToInt32(TextBox4.Text); //HtmlTextArea skillupload = (HtmlTextArea)(FindControl("TextArea1")); //mr.skill = skillupload.Value; //HtmlTextArea Langupload = (HtmlTextArea)(FindControl("TextArea2")); //mr.pgmlang = Langupload.InnerText; //HtmlTextArea descupload = (HtmlTextArea)(FindControl("TextArea3")); //mr.prjdesc = descupload.Value; mr.skill = TextBox5.Text; mr.pgmlang = TextBox6.Text; mr.exp = Convert.ToInt32(TextBox7.Text); mr.prjdesc = TextBox8.Text; mr.status = "open"; mr.date = DateTime.Today; b.storereq(mr); Label1.Text = "Successful"; TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; TextBox7.Text = ""; TextBox8.Text = ""; }
protected void LinkButton1_Click(object sender, EventArgs e) { Response.Redirect("pdtmanager.aspx?username=" + name); mgr = new managerreq(); mgr.mgrname = Label1.Text; List <managerreq> ls = b.record(mgr.mgrname); GridView2.DataSource = ls; GridView2.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { string username = Request.QueryString["username"]; name = username; Session["UserName"] = username; Label1.Text = Session["UserName"] as string; mgr = new managerreq(); mgr.mgrname = Label1.Text; }
public DataTable status() { managerreq usr = new managerreq(); con.Open(); SqlCommand cmd = new SqlCommand("select * from request_table", con); SqlDataReader rdr = cmd.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(rdr); con.Close(); return(dt); }
public List <managerreq> record(string name) { DataTable dt = d.status(); for (int i = 0; i < dt.Rows.Count; i++) { mgr = new managerreq(); if (dt.Rows[i].ItemArray[0].ToString() == name) { mgr.reqid = Convert.ToInt32(dt.Rows[i].ItemArray[8].ToString()); mgr.status = dt.Rows[i].ItemArray[9].ToString(); mgr.prjname = dt.Rows[i].ItemArray[1].ToString(); //mgr.date = Convert.ToDateTime(dt.Rows[i].ItemArray[10].ToString()); ls.Add(mgr); } } return(ls); }
protected void Page_Load(object sender, EventArgs e) { string username = Request.QueryString["appid"]; name = username; Session["UserName"] = username; Label11.Text = Session["UserName"] as string; m = b.displayapp(name); Label2.Text = m.jobdesc; Label3.Text = m.minqual; Label4.Text = m.prefqual; Label5.Text = m.resp; Label6.Text = m.skill; Label7.Text = m.pgmlang; Label8.Text = m.exp.ToString(); Label9.Text = m.desig; Label10.Text = m.lastdate.ToString(); }
public void store(managerreq usr) { con.Open(); SqlCommand cmd = new SqlCommand("insert into request_table values(@mgrname,@projectname,@period,@noofvac,@skill,@pgmlang,@exp,@desc,@status,@date,@desig)", con); cmd.Parameters.AddWithValue("@mgrname", usr.mgrname); cmd.Parameters.AddWithValue("@projectname", usr.prjname); cmd.Parameters.AddWithValue("@period", usr.period); cmd.Parameters.AddWithValue("@noofvac", usr.noofvacancies); cmd.Parameters.AddWithValue("@skill", usr.skill); cmd.Parameters.AddWithValue("@pgmlang", usr.pgmlang); cmd.Parameters.AddWithValue("@exp", usr.exp); cmd.Parameters.AddWithValue("@desc", usr.prjdesc); cmd.Parameters.AddWithValue("@status", usr.status); cmd.Parameters.AddWithValue("@date", usr.date); cmd.Parameters.AddWithValue("@desig", usr.desig); cmd.ExecuteNonQuery(); con.Close(); }
/*public bool Rec(userentity usr) * { * bool x = false; * DataTable dt = d.dispRec(); * for (int i = 0; i < dt.Rows.Count; i++) * { * if (dt.Rows[i].ItemArray[3].ToString() == usr.email && dt.Rows[i].ItemArray[2].ToString() == usr.pwd) * { * x = true; * * } * } * return x; * }*/ /* public void storereq(managerreq mgr) * { * d.store(mgr); * } * public List<managerreq> record(string name) * { * DataTable dt = d.status(); * for (int i = 0; i < dt.Rows.Count; i++) * { * mgr = new managerreq(); * if (dt.Rows[i].ItemArray[0].ToString() == name) * { * mgr.reqid = Convert.ToInt32(dt.Rows[i].ItemArray[8].ToString()); * mgr.status = dt.Rows[i].ItemArray[9].ToString(); * mgr.prjname = dt.Rows[i].ItemArray[1].ToString(); * mgr.date = Convert.ToDateTime(dt.Rows[i].ItemArray[11].ToString()); * ls.Add(mgr); * * * } * * * * } * return ls; * }*/ public managerreq displayapp(string name) { DataTable dt = d.app(); int l = dt.Rows.Count - 1; for (int i = l; i >= 0; i--) { if (dt.Rows[i].ItemArray[6].ToString() == "inprogress" && dt.Rows[i].ItemArray[0].ToString() == name) { mgr = new managerreq(); mgr.jobdesc = dt.Rows[i].ItemArray[1].ToString(); mgr.minqual = dt.Rows[i].ItemArray[2].ToString(); mgr.prefqual = dt.Rows[i].ItemArray[3].ToString(); mgr.resp = dt.Rows[i].ItemArray[4].ToString(); mgr.skill = dt.Rows[i].ItemArray[11].ToString(); mgr.pgmlang = dt.Rows[i].ItemArray[12].ToString(); mgr.exp = Convert.ToInt32(dt.Rows[i].ItemArray[13].ToString()); mgr.desig = dt.Rows[i].ItemArray[14].ToString(); mgr.lastdate = Convert.ToDateTime(dt.Rows[i].ItemArray[15].ToString()).AddDays(10); // mgr.lastdate = DateTime.Now.AddDays(10); } } return(mgr); }
public void storereq(managerreq mgr) { d.store(mgr); }