Beispiel #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        NguoiDungDTO nd = new NguoiDungDTO();

        nd.Taikhoan = txttaikhoan.Text;
        nd.Matkhau  = "123456".ToString();
        nd.Quyen    = "giaovien".ToString();
        nd.CauhoiBM = "";
        nd.Traloi   = "";
        bllnd.SaveNguoidung(nd);
        GiaovienDTO gv = new GiaovienDTO();

        gv.HotenGV  = txthotengv.Text;
        gv.Ngaysinh = Convert.ToDateTime(txtns.Text);
        gv.Chunhiem = false;
        gv.Taikhoan = txttaikhoan.Text;
        bll.SaveGiaovien(gv);
        ClearTextbox();
        FillGridView();
    }
Beispiel #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        NguoiDungDTO nd = new NguoiDungDTO();

        nd.Taikhoan = txttaikhoan.Text;
        nd.Matkhau  = "123456".ToString();
        nd.Quyen    = "hocsinh".ToString();
        nd.CauhoiBM = "";
        nd.Traloi   = "";
        bllnd.SaveNguoidung(nd);
        HocSinhDTO hs = new HocSinhDTO();

        hs.HotenHS  = txthotenhs.Text;
        hs.NgaySinh = Convert.ToDateTime(txtns.Text);
        hs.DiaChi   = txtdc.Text;
        hs.TaiKhoan = txttaikhoan.Text;
        bll.SaveHocsinh(hs);
        ClearTextbox();
        FillGridView();
    }