public UniversalEntity RetrieveVodomerById(int id) { VodomerTypeDAO entDAO = new VodomerTypeDAO(); sc = new SqlCommand("RetrieveVodomerTypeById"); sc.CommandType = CommandType.StoredProcedure; sc.Parameters.Add("@ID", id); return(entDAO.retrieveEntity(sc)); }
public int CreateVodomerType(VodomerType ent) { int createdid = 0; VodomerTypeDAO entDAO = new VodomerTypeDAO(); sc = new SqlCommand("CreateVodomerType"); sc.CommandType = CommandType.StoredProcedure; addParameters(ent); createdid = entDAO.createEntity(sc); return(createdid); }
public bool UpdateVodomerType(VodomerType ent) { bool success = true; VodomerTypeDAO entDAO = new VodomerTypeDAO(); sc = new SqlCommand("UpdateRegisty"); sc.CommandType = CommandType.StoredProcedure; sc.Parameters.Add("@ID", ent.ID); sc.Parameters.Add("@Approve", ent.Approve); sc.Parameters.Add("@conventional_signth", ent.ConventionalSignth); sc.Parameters.Add("@diameter", ent.Diameter); sc.Parameters.Add("@id_seller", ent.SellerID); sc.Parameters.Add("@Active", ent.IsActive); sc.Parameters.Add("@description", ent.Description); sc.Parameters.Add("@GovRegister", ent.GovRegister); sc.Parameters.Add("@DateProduced", ent.DateProduced); sc.Parameters.Add("@CheckInterval", ent.CheckInterval); //addParameters(ent); success = entDAO.updateEntity(sc); return(success); }