Пример #1
0
        private void TileQuanLy_Click(object sender, EventArgs e)
        {
            Class.XuLyThuVien KiemTra = new Class.XuLyThuVien();

            try
            {
                ImageQuanLy.Image = Image.FromStream(KiemTra.ReadImage(IdNguoiDung));
            }
            catch (Exception EX)
            {
                MessageBox.Show(EX.Message);
            }
            NguoiDung User = KiemTra.LoadThongTinNguoiDung(IdNguoiDung);

            lblTenQuanLy.Text      = User.Ten;
            lblDiaChiQuanLy.Text   = User.DiaChi;
            lblGioiTinhQL.Text     = User.GioiTinh;
            lblPhoneQuanLy.Text    = User.SoDienThoai;
            lblNgaySinhQuanLy.Text = User.NgaySinh;


            //reset
            lblTitel_Click(sender, e);
            ImageQuanLy.Visible    = true;
            PannelQuanLy.Visible   = true;
            btnChoose.Visible      = true;
            btnEditImageQL.Visible = true;
            lblTieuTeTabQL.Visible = true;
            lblTieuTeTabQL.Text    = "Thông Tin Người Dùng";
        }
Пример #2
0
 private void btnEditAnhNhanVien_Click(object sender, EventArgs e)
 {
     try
     {
         Class.XuLyThuVien KiemTra = new Class.XuLyThuVien();
         KiemTra.UpdateAvatar(IdNguoiDung, ConvertImageToURL());
         TileQuanLy.Image = Image.FromStream(KiemTra.ReadImage(IdNguoiDung));
         MetroFramework.MetroMessageBox.Show(this, "OKey");
     }
     catch (Exception)
     {
     }
 }
Пример #3
0
        //------



        private void Main_Load(object sender, EventArgs e)
        {
            Class.XuLyThuVien KiemTra = new Class.XuLyThuVien();
            GridViewCaiDat.DataSource = KiemTra.DGVCaiDat();


            TileTraCuuSach.Text     = "Tra Cứu Sách";
            TileLapPhieuMuon.Text   = "Lập Thẻ\r\nThư Viện";
            TileNhanTraSach.Text    = "Thêm Sách\r\nNhận Sách";
            TileThayDoiQuyDinh.Text = "Thay Đổi\r\nQuy Định";

            //Mặc Định---------------------------------------
            Class.CaiDat Setting = new Class.CaiDat();
            Setting          = KiemTra.LayThongTinCaiDat();
            TuoiMuonSach     = Setting.TuoiMuonSach;
            GiaTriThe        = Setting.HanSuDungThe;
            NgayMuonToiDa    = Setting.NgayMuonToiDa;
            SoLuongMuonToiDa = Setting.SachMuonToiDa;

            if (TuoiMuonSach != 6 || GiaTriThe != 6 || NgayMuonToiDa != 4 || SoLuongMuonToiDa != 5)
            {
                ToggleDefaul.Checked = false;
            }


            //TileAbout.text
            TileAbout.Text = "Tên:Nguyễn Anh Kiệt   MSSV:1461426     SĐT:01674678354\r\nNguyễn F R   1461426     +841674678354\r\nNguyễn Anh E   1461426     +841674678354\r\nNguyễn Anh W   1461426     +841674678354\r\nNguyễn Anh Q   1461426     +841674678354";


            NguoiDung User = KiemTra.LoadThongTinNguoiDung(IdNguoiDung);

            TileNameQuanLy.Text = User.Ten;
            try
            {
                TileQuanLy.Image = Image.FromStream(KiemTra.ReadImage(IdNguoiDung));
            }
            catch (Exception EX)
            {
                MessageBox.Show(EX.Message);
            }
        }