コード例 #1
0
 private void ucActions1_OnDelete(object obj)
 {
     //DMLoaiDichVuInfor khaibao = new DMLoaiDichVuInfor();
     //khaibao.IdLoaiDichVu = Convert.ToInt32(getValue("clIdLoaiDichVu"));
     DMLoaiDichVuDataProvider.Delete(new DMLoaiDichVuInfor {
         IdLoaiDichVu = Convert.ToInt32(getValue("clIdLoaiDichVu"))
     });
     MessageBox.Show("Xóa Thành Công", "Thông Báo");
     dgvList.DataSource = DMLoaiDichVuDataProvider.GetListDichVuInfo();
 }
コード例 #2
0
        private void ucActions1_OnAdd(object obj)
        {
            DMLoaiDichVuInfor dmLoaiDichVuInfor = new DMLoaiDichVuInfor();

            dmLoaiDichVuInfor.MaLoaiDichVu = txtMaLoaiDichVu.Text;
            dmLoaiDichVuInfor.TenDichVu    = txtTenLoaiDichVu.Text;
            dmLoaiDichVuInfor.GhiChu       = txtGhiChu.Text;
            dmLoaiDichVuInfor.SuDung       = Convert.ToInt32(cbSuDung.Checked);
            DMLoaiDichVuDataProvider.Insert(dmLoaiDichVuInfor);
            MessageBox.Show("Thêm bảng thành công!");
            dgvList.DataSource = DMLoaiDichVuDataProvider.GetListDichVuInfo();
        }
コード例 #3
0
        private void frmDM_LoaiDichVu_Load(object sender, EventArgs e)
        {
            try
            {
                dgvList.DataSource = DMLoaiDichVuDataProvider.GetListDichVuInfo();
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show("Lỗi ngoại lệ: " + ex.ToString(), Declare.titleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
#else
                MessageBox.Show("Lỗi ngoại lệ: " + ex.Message, Declare.titleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
#endif
                this.Dispose();
            }
        }
コード例 #4
0
 protected override void LoadData()
 {
     grcBase.DataSource = DMLoaiDichVuDataProvider.GetListDichVuInfo();
     btnTimKiem.Text    = Resources.btnSearch;
 }