コード例 #1
0
 private int Delete(string strMaDM)
 {
     int kq = 0;
     clsDM_Thuoc obj = new clsDM_Thuoc();
     if (MessageBox.Show("Bạn muốn xóa?", "Thông báo", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         kq = obj.Delete(strMaDM);
     }
     return kq;
 }
コード例 #2
0
        private int Delete()
        {
            int kq = 0;
            clsDM_Thuoc obj = new clsDM_Thuoc();
            if (MessageBox.Show("Bạn muốn xóa?", "Thông báo", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                if (gridMaster.SelectedRows.Count != 0)
                {
                    DataGridViewRow row = this.gridMaster.SelectedRows[0];
                    string MaThuoc = row.Cells["MaThuoc"].Value.ToString();
                    kq = obj.Delete(MaThuoc);
                    if (kq > 0)
                    {
                        LoadGridView();
                    }
                }

            }
            return kq;
        }