示例#1
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            DataTable numberr;

            _dttb = new DTO_ThietBi()
            {
                ID_INF_MAC = cls_Main._Luachon
            };
            if (cbtinhtrang.SelectedIndex == 1)
            {
                numberr = _tbb.ThietBiKhongHoatDong(ref err, _dttb, 0);
                if (numberr.Rows.Count > 0)
                {
                    var thietbi = new ThietBi();
                    cls_Main.LoadUserControl2(cls_Controls._pn_Hienthi, thietbi);
                    thietbi.ThietBiSelectOld();
                }
            }
            else
            {
                numberr = _tbb.ThietBiKhongHoatDong(ref err, _dttb, 1);
                if (numberr.Rows.Count > 0)
                {
                    var thietbi = new ThietBi();
                    cls_Main.LoadUserControl2(cls_Controls._pn_Hienthi, thietbi);
                    thietbi.ThietBiSelectOld();
                }
            }
        }
示例#2
0
        public void MuonThietBi()
        {
            DataTable numberr;

            _dttb = new DTO_ThietBi()
            {
                STT         = GetMaxID() + 1,
                ID_CALEN    = Convert.ToInt32(cblichgv.SelectedValue),
                ID_INF_MAC  = cls_Main._Id_inf_mac,
                ID_STATUS   = 3,
                ID_TEACHER  = Convert.ToInt32(cbnhanvien.SelectedValue),
                DATE_TIME   = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                REASON_RENT = txtlydomuon.Text.Trim(),
                DATE_RENT   = dtngaymuon.Value.ToString("yyyy-MM-dd HH:mm:ss")
            };

            numberr = _tbb.MuonThietBi(ref err, _dttb);
            if (numberr.Rows.Count > 0)
            {
                var thietbi = new ThietBi();

                cls_Main.LoadUserControl2(cls_Controls._pn_Hienthi, thietbi);
                thietbi.ThietBiSelectOld();
            }
        }
示例#3
0
        public void TraThietBi()
        {
            DataTable numberr;

            _dttb = new DTO_ThietBi()
            {
                STT        = GetSTT(cls_Main._Id_inf_mac),
                DATE_RENT  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                ID_INF_MAC = cls_Main._Id_inf_mac
            };

            numberr = _tbb.TraThietBi(ref err, _dttb);


            var thietbi = new ThietBi();

            cls_Main.LoadUserControl2(cls_Controls._pn_Hienthi, thietbi);
            thietbi.ThietBiSelectOld();
        }
示例#4
0
        public void HongThietBi()
        {
            DataTable numberr;

            _dttb = new DTO_ThietBi()
            {
                STT          = GetMaxID() + 1,
                ID_CALEN     = Convert.ToInt32(cblichgv.SelectedValue),
                ID_INF_MAC   = cls_Main._Id_inf_mac,
                DATE_TIME    = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                DATE_FIX     = dtngaysua.Value.ToString("yyyy-MM-dd HH:mm:ss"),
                REASON_FIX   = txttinhtranghientai.Text.Trim(),
                REASON_ERROR = txtlydohong.Text.Trim()
            };

            numberr = _tbb.HongThietBi(ref err, _dttb);
            if (numberr.Rows.Count > 0)
            {
                var thietbi = new ThietBi();

                cls_Main.LoadUserControl2(cls_Controls._pn_Hienthi, thietbi);
                thietbi.ThietBiSelectOld();
            }
        }