Beispiel #1
0
 private void Delete()
 {
     DMLoaiItemDataProvider.Delete(new DMLoaiItemInfor {
         IdLoaiItem = Oid
     });
     LoadData();
     SetControl(false);
 }
 private void ucActions1_OnDelete(object obj)
 {
     //DMLoaiItemInfor khaibao = new DMLoaiItemInfor();
     //khaibao.MaLoaiItem = Convert.ToString(getValue("clMaLoaiItem"));
     DMLoaiItemDataProvider.Delete(new DMLoaiItemInfor {
         IdLoaiItem = Convert.ToInt32(getValue("clIdLoaiItem"))
     });
     MessageBox.Show("Xóa Thành Công", "Thông Báo");
     dgvList.DataSource = DMLoaiItemDataProvider.GetListItemInfor();
 }
Beispiel #3
0
        public frmDmLoaiItemTestUnits()
        {
            frmLogin frmLogin = new frmLogin();

            frmLogin.TestLogin("quantri", "quantri");

            //chuẩn bị dữ liệu để test
            List <DMLoaiItemInfor> list      = DMLoaiItemDataProvider.GetListItemInfor();
            List <DMLoaiItemInfor> listMatch = list.FindAll(delegate(DMLoaiItemInfor match)
            {
                return(match.MaLoaiItem == "5");
            });

            foreach (var dmLoaiItemInfor in listMatch)
            {
                DMLoaiItemDataProvider.Delete(dmLoaiItemInfor);
            }
        }