コード例 #1
0
        public UniversalEntity RetrieveVodomerAbonentOrderByID(int id)
        {
            FAbonentDAO entDAO = new FAbonentDAO();

            sc             = new SqlCommand("RetrieveFAbonentByOrderByVodomerID");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@OrderID", id);
            return(entDAO.retrieveEntity(sc));
        }
コード例 #2
0
        /*public bool UpdateClientPerson(FAbonent ent)
         * {
         *  bool success = true;
         *  FAbonentDAO entDAO = new FAbonentDAO();
         *  sc = new SqlCommand("UpdateClientPerson");
         *  sc.CommandType = CommandType.StoredProcedure;
         *  sc.Parameters.Add("@ID", ent.ID);
         *  addParameters(ent);
         *  success = entDAO.updateEntity(sc);
         *  return success;
         * }*/
        public UniversalEntity RetrieveClientPersonById(int id)
        {
            FAbonentDAO entDAO = new FAbonentDAO();

            sc             = new SqlCommand("RetrieveClientPersonById");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@ID", id);
            return(entDAO.retrieveEntity(sc));
        }
コード例 #3
0
        public UniversalEntity RetrieveLikeSurname(string name)
        {
            FAbonentDAO entDAO = new FAbonentDAO();

            sc             = new SqlCommand("RetrieveFAbonentLikeSurname");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@name", name);
            return(entDAO.retrieveEntity(sc));
        }
コード例 #4
0
        public int Create(FAbonent ent)
        {
            int         createdid = 0;
            FAbonentDAO entDAO    = new FAbonentDAO();

            sc             = new SqlCommand("CreateFAbonent");
            sc.CommandType = CommandType.StoredProcedure;
            addParameters(ent);
            createdid = entDAO.createEntity(sc);
            return(createdid);
        }
コード例 #5
0
        public bool UpdateClientPerson(FAbonent ent)
        {
            bool        success = true;
            FAbonentDAO entDAO  = new FAbonentDAO();

            sc             = new SqlCommand("UpdateClientPerson");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@ID", ent.ID);
            addParameters(ent);
            success = entDAO.updateEntity(sc);
            return(success);
        }
コード例 #6
0
        public bool Delete(int FabonentID, int UserID)
        {
            bool        success = true;
            FAbonentDAO entDAO  = new FAbonentDAO();

            sc             = new SqlCommand("DeleteFAbonent");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@UserID ", UserID);
            sc.Parameters.Add("@FAbonentID ", FabonentID);
            //addParameters(ent);
            success = entDAO.updateEntity(sc);
            return(success);
        }
コード例 #7
0
        public bool Update(FAbonent ent, int UserID)
        {
            bool        success = true;
            FAbonentDAO entDAO  = new FAbonentDAO();

            sc             = new SqlCommand("UpdateFAbonent");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@UserID ", UserID);
            sc.Parameters.Add("@FAbonentID ", ent.ID);
            sc.Parameters.Add("@FirstName", ent.FirstName);
            sc.Parameters.Add("@Surname", ent.Surname);
            sc.Parameters.Add("@LastName", ent.LastName);
            sc.Parameters.Add("@Address", ent.Address);
            sc.Parameters.Add("@Phone", ent.Phone);
            sc.Parameters.Add("@DistrictID", ent.DistrictID);
            sc.Parameters.Add("@NotPay", ent.NotPay);
            //addParameters(ent);
            success = entDAO.updateEntity(sc);
            return(success);
        }
コード例 #8
0
        public bool UpdateAbonent(FAbonent ent, int UserID)
        {
            bool        succes = true;
            FAbonentDAO entDAO = new FAbonentDAO();

            sc             = new SqlCommand("UpdateFAbonentNew");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@UserID", UserID);
            sc.Parameters.Add("@FAbonentID", ent.ID);
            sc.Parameters.Add("@FirstName", ent.FirstName);
            sc.Parameters.Add("@Surname", ent.Surname);
            sc.Parameters.Add("@LastName", ent.LastName);
            sc.Parameters.Add("Address", ent.Address);
            sc.Parameters.Add("@NumberJournal", ent.PhysicalNumberJournal);
            sc.Parameters.Add("@Phone", ent.Phone);
            sc.Parameters.Add("@DistrictID", ent.DistrictID);
            sc.Parameters.Add("@NotPay", ent.NotPay);
            //sc.Parameters.Add("@RejectVodomer", ent.RejectVodomer);
            succes = entDAO.updateEntity(sc);
            return(succes);
        }