public UniversalEntity RetrieveByOrderID(int id) { UAbonentDAO entDAO = new UAbonentDAO(); sc = new SqlCommand("RetrieveUAbonentByOrderID"); sc.CommandType = CommandType.StoredProcedure; sc.Parameters.Add("@OrderID", id); return(entDAO.retrieveEntity(sc)); }
/* * public UniversalEntity RetrieveClientPersonById(int id) * { * UAbonentDAO entDAO = new UAbonentDAO(); * sc = new SqlCommand("RetrieveClientPersonById"); * sc.CommandType = CommandType.StoredProcedure; * sc.Parameters.Add("@ID", id); * return (entDAO.retrieveEntity(sc)); * }*/ public UniversalEntity RetrieveLikeSurname(string name) { UAbonentDAO entDAO = new UAbonentDAO(); sc = new SqlCommand("RetrieveUAbonentLikeSurname"); sc.CommandType = CommandType.StoredProcedure; sc.Parameters.Add("@name", name); return(entDAO.retrieveEntity(sc)); }
public int Create(UAbonent ent) { int createdid = 0; UAbonentDAO entDAO = new UAbonentDAO(); sc = new SqlCommand("CreateUAbonent"); sc.CommandType = CommandType.StoredProcedure; addParameters(ent); createdid = entDAO.createEntity(sc); return(createdid); }
public bool Update(UAbonent ent) { bool success = true; UAbonentDAO entDAO = new UAbonentDAO(); sc = new SqlCommand("UpdateUabonent"); sc.CommandType = CommandType.StoredProcedure; sc.Parameters.Add("@ID", ent.ID); addParameters(ent); success = entDAO.updateEntity(sc); return(success); }