Пример #1
0
 public ActionResult Register(string email2, string password2, string optradio)
 {
     if (optradio == "Student")
     {
         Student_Work sw = new Student_Work();
         sw.Create_Student("", password2, "", 0, email2, "");
     }
     else
     {
         Faculty_Work fw = new Faculty_Work();
         fw.Add_Faculty("", "", "", email2, password2, "");
     }
     return(RedirectToAction("Login"));
 }
Пример #2
0
    public void StuFind(Student_Work work, SqlDataReader reader)
    {
        ((Button)work.FindControl("name")).Text   = reader.GetString(2);
        ((Label)work.FindControl("time")).Text    = reader.GetString(3);
        ((Label)work.FindControl("where")).Text   = reader.GetString(4);
        ((Label)work.FindControl("renshu")).Text  = reader.GetInt32(6).ToString();
        ((Label)work.FindControl("gongzi1")).Text = reader.GetInt32(7).ToString();

        ((Label)work.FindControl("name1")).Text        = ((Button)work.FindControl("name")).Text;
        ((Label)work.FindControl("time1")).Text        = ((Label)work.FindControl("time")).Text;
        ((Label)work.FindControl("where1")).Text       = ((Label)work.FindControl("where")).Text;
        ((Label)work.FindControl("jieshao1")).Text     = reader.GetString(5);
        ((Label)work.FindControl("renshu1")).Text      = ((Label)work.FindControl("renshu")).Text;
        ((Label)work.FindControl("gongzidaiyu1")).Text = ((Label)work.FindControl("gongzi1")).Text;
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlDataReader reader = DAL.ManagerDAL.SelectAllJob();

        while (reader.Read())
        {
            if (reader.GetString(8).Trim() == "2")
            {
                Student_Work work = (Student_Work)LoadControl("Work.ascx");
                work.StuFind(work, reader);

                Panel1.Controls.Add(work);
            }
        }
    }