Exemple #1
0
        //public int XoaSV(int id)
        //{


        //    try
        //    {
        //        //string sql = String.Format("delete from SinhVien where MaSV = {0}", id);
        //        string sql = "delete from SinhVien where MaSV = " + id.ToString();
        //        return dp.ExcuteNonquery(sql, CommandType.Text, null);
        //    }
        //    catch (Exception ex)
        //    {

        //        throw ex;
        //    }



        //}
        public int XoaSV(int id)
        {
            try
            {
                dp.Con();
                //string sql = String.Format("delete from SinhVien where MaSV = {0}", id);
                string sql = "delete from SinhVien where MaSV = " + id;
                return(dp.ExecTest(sql));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }