Ejemplo n.º 1
0
        private void frmMuonTraSach_Load(object sender, EventArgs e)
        {
            qdBUS  = new QuyDinhBUS();
            listQD = new List <QuyDinhDTO>();
            listQD = qdBUS.select();

            this.comboBox_PhuongThuc.Items.Insert(0, "Toàn bộ");
            this.comboBox_PhuongThuc.Items.Insert(1, "Bằng mã phiếu mượn");
            this.comboBox_PhuongThuc.Items.Insert(2, "Bằng mã phiếu trả");
            this.comboBox_PhuongThuc.Items.Insert(3, "Bằng mã đọc giả");
            this.comboBox_PhuongThuc.Items.Insert(4, "Bằng mã sách");
            this.comboBox_PhuongThuc.SelectedIndex = 0;
            dgBus         = new DocGiaBUS();
            sachBus       = new SachBUS();
            ldgBus        = new LoaiDocGiaBUS();
            pmBus         = new PhieuMuonBUS();
            listPhieuMuon = new List <PhieuMuonDTO>();
            listDocGia    = new List <DocGiaDTO>();
            listSach      = new List <SachDTO>();
            //  loadData_Vao_GridView("", DocGiaDAL.TimToanBo);
            listPhieuMuon = pmBus.select();
            loadLoaiDocGia_Combobox();
            loadMaSach_Combobox();
            loadData_Vao_GridView(listPhieuMuon);
        }
Ejemplo n.º 2
0
        private void button_SuaQuyDinh_Click(object sender, EventArgs e)
        {
            QuyDinhDTO temp = new QuyDinhDTO();

            DialogResult dlr = MessageBox.Show("Bạn có muốn sử quy dinh không?", "Xác nhận!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (dlr == DialogResult.Yes)
            {
                temp.TuoiToiThieu         = Convert.ToInt32(this.numericUpDown_TuoiToiThieu.Value);
                temp.TuoiToiDa            = Convert.ToInt32(this.numericUpDown_TuoiToiDa.Value);
                temp.SoNgayMuonToiDa      = Convert.ToInt32(this.numericUpDown_NgayMuonToiDa.Value);
                temp.SoSachMuonToiDa      = Convert.ToInt32(this.numericUpDown_SachMuonToiDa.Value);
                temp.KhoangCachNamXuatBan = Convert.ToInt32(this.numericUpDown_NamXuatBan.Value);
                bool kq = qdBUS.sua(temp);
                if (kq == false)
                {
                    MessageBox.Show("Sửa quy định thất bại.");
                }
                else
                {
                    listQD = qdBUS.select();

                    this.numericUpDown_TuoiToiThieu.Value  = listQD[0].TuoiToiThieu;
                    this.numericUpDown_TuoiToiDa.Value     = listQD[0].TuoiToiDa;
                    this.numericUpDown_NgayMuonToiDa.Value = listQD[0].SoNgayMuonToiDa;
                    this.numericUpDown_SachMuonToiDa.Value = listQD[0].SoSachMuonToiDa;
                    this.numericUpDown_NamXuatBan.Value    = listQD[0].KhoangCachNamXuatBan;
                    MessageBox.Show("Sửa quy dịnh thành công");
                }
            }
            else
            {
                MessageBox.Show("Không sửa.");
            }
        }
 private void frmQuanLyTheDocGia_Load(object sender, EventArgs e)
 {
     dgBus      = new DocGiaBUS();
     ldgBus     = new LoaiDocGiaBUS();
     listDocGia = new List <DocGiaDTO>();
     loadData_Vao_GridView("", DocGiaDAL.TimToanBo);
     qdBUS  = new QuyDinhBUS();
     listQD = new List <QuyDinhDTO>();
     listQD = qdBUS.select();
     loadLoaiDocGia_Combobox();
     AddDataToCmbTimKiem();
 }
Ejemplo n.º 4
0
        private void frmQuyDinh_Load(object sender, EventArgs e)
        {
            qdBUS  = new QuyDinhBUS();
            listQD = new List <QuyDinhDTO>();
            listQD = qdBUS.select();

            //        this.tb_MaDG.Text = listQD[0].MaQD;
            this.numericUpDown_TuoiToiThieu.Value  = listQD[0].TuoiToiThieu;
            this.numericUpDown_TuoiToiDa.Value     = listQD[0].TuoiToiDa;
            this.numericUpDown_NgayMuonToiDa.Value = listQD[0].SoNgayMuonToiDa;
            this.numericUpDown_SachMuonToiDa.Value = listQD[0].SoSachMuonToiDa;
            this.numericUpDown_NamXuatBan.Value    = listQD[0].KhoangCachNamXuatBan;
        }
Ejemplo n.º 5
0
        private void frmQuanLySach_Load(object sender, EventArgs e)
        {
            qdBUS  = new QuyDinhBUS();
            listQD = new List <QuyDinhDTO>();
            listQD = qdBUS.select();

            sachBUS  = new SachBUS();
            tlBUS    = new TheLoaiBUS();
            listSach = new List <SachDTO>();
            List <PhieuMuonDTO> ls = new PhieuMuonBUS().select();

            listSach = sachBUS.select(ls);
            loadData_Vao_GridView(listSach);
            loadData_Vao_Combobox();
            AddDataToCmbTimKiem();
            this.dateTimePicker_NgayNhap.Value = DateTime.Now;
        }