コード例 #1
0
        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));
        }
コード例 #2
0
        /*
         * 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));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }