示例#1
0
        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));
        }
示例#2
0
 public void Delete(int id)
 {
     Conection.DeleteData("Subject", id);
 }
示例#3
0
 public DataTable GetAll()
 {
     return(Conection.GetAll("Subject"));
 }