public bool baocaotuan_xoa(DOT_baocaotuan bc) { using (SqlConnection conn = getConnect()) { SqlCommand cmd = new SqlCommand("sp_delete_baocaotuan", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@mabcn", bc.mabcn)); cmd.ExecuteNonQuery(); } return(true); }
public int baocaotuan_them(DOT_baocaotuan bc) { using (SqlConnection conn = getConnect()) { SqlCommand cmd = new SqlCommand("sp_insert_baocaotuan", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@manv", bc.manv)); cmd.Parameters.Add(new SqlParameter("@macv", bc.macv)); cmd.Parameters.Add(new SqlParameter("@ghichu", bc.ghichu)); cmd.Parameters.Add(new SqlParameter("@ngay", bc.ngay)); cmd.Parameters.Add(new SqlParameter("@tiendo", bc.tiendo)); cmd.Parameters.Add(new SqlParameter("@dexuat", bc.dexuat)); return(Convert.ToInt32(cmd.ExecuteScalar())); } }
public bool baocaotuan_sua(DOT_baocaotuan bc) { using (SqlConnection conn = getConnect()) { SqlCommand cmd = new SqlCommand("sp_update_baocaotuan", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@mabcn", bc.mabcn)); cmd.Parameters.Add(new SqlParameter("@manv", bc.manv)); cmd.Parameters.Add(new SqlParameter("@macv", bc.macv)); cmd.Parameters.Add(new SqlParameter("@ghichu", bc.ghichu)); cmd.Parameters.Add(new SqlParameter("@ngay", bc.ngay)); cmd.Parameters.Add(new SqlParameter("@tiendo", bc.tiendo)); cmd.Parameters.Add(new SqlParameter("@dexuat", bc.dexuat)); cmd.ExecuteNonQuery(); } return(true); }