public DataTable GetByStore(string name, string code, int?credits, int?hours, int?period, int?status) { //IList<string> parameters = new List<string>(); //parameters.Add("'" + name + "'"); //parameters.Add("'" + code + "'"); //parameters.Add(VerifyNumericValueParameter(credits)); //parameters.Add(VerifyNumericValueParameter(hours)); //parameters.Add(VerifyNumericValueParameter(period)); //parameters.Add(VerifyNumericValueParameter(status)); IList <SqlParameter> sqlParameters = new List <SqlParameter>(); sqlParameters.Add(new SqlParameter("@name", name)); sqlParameters.Add(new SqlParameter("@code", code)); sqlParameters.Add(new SqlParameter("@credits", (credits))); sqlParameters.Add(new SqlParameter("@hours", (hours))); sqlParameters.Add(new SqlParameter("@period", (period))); sqlParameters.Add(new SqlParameter("@status", (status))); return(Conection.GetByStore("SubjectGet", sqlParameters)); }
public void Delete(int id) { Conection.DeleteData("Subject", id); }
public DataTable GetAll() { return(Conection.GetAll("Subject")); }