Exemple #1
0
        public void delete(dtonhanvien k)
        {
            openC();

            SqlCommand cmd = new SqlCommand("sp_delete_NHANVIEN", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add(new SqlParameter("@MANV", k.MANV));

            cmd.ExecuteNonQuery();

            closeC();
        }
Exemple #2
0
        public void insert(dtonhanvien k)
        {
            openC();
            SqlCommand cmd = new SqlCommand("sp_insert_NHANVIEN", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add(new SqlParameter("@MANV", k.MANV));
            cmd.Parameters.Add(new SqlParameter("@TENNV", k.TENNV));
            cmd.Parameters.Add(new SqlParameter("@DIACHI", k.DIACHI));
            cmd.Parameters.Add(new SqlParameter("@SDT", k.SDT));
            cmd.Parameters.Add(new SqlParameter("@MACV", k.MACV));
            cmd.ExecuteNonQuery();
            closeC();
        }