public static string Insertar(string nombre, string grado, string año) { DCurso Obj = new DCurso(); Obj.Nombre = nombre; Obj.Grado = grado; Obj.Año = año; return(Obj.Insertar(Obj)); }
public static string insertar(string Nombre_Curso, int Cupo) { DCurso Datos = new DCurso(); string Existe = Datos.Existe(Nombre_Curso); if (Existe.Equals("1")) { return("El curso ya existe"); } else { Curso Obj = new Curso(); Obj.Nombre_Curso = Nombre_Curso; Obj.Cupo = Cupo; return(Datos.Insertar(Obj)); } }