Exemple #1
0
        public bool UpdateFOrder(FOrder ent)
        {
            bool      success = true;
            FOrderDAO entDAO  = new FOrderDAO();

            sc             = new SqlCommand("UpdateFOrder");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@ID", ent.ID);
            sc.Parameters.Add("@IsPaid", ent.IsPaid);
            sc.Parameters.Add("@UserID", ent.UserID);
            if (ent.DateOut == null)
            {
                sc.Parameters.Add("@DateOut", DBNull.Value);
            }
            else
            {
                sc.Parameters.Add("@DateOut", ent.DateOut);
            }
            if (ent.PaymentDay == null)
            {
                sc.Parameters.Add("@PaymentDay", DBNull.Value);
            }
            else
            {
                sc.Parameters.Add("@PaymentDay", ent.PaymentDay.Value);
            }
            //addParameters(ent);
            success = entDAO.updateEntity(sc);
            return(success);
        }
Exemple #2
0
        public UniversalEntity RetrieveVodomerAndFOrderID(int id)
        {
            FOrderDAO entDAO = new FOrderDAO();

            sc             = new SqlCommand("RetrieveFOrderAndVodomerById");
            sc.CommandType = CommandType.StoredProcedure;
            sc.Parameters.Add("@ID", id);
            return(entDAO.retrieveEntity(sc));
        }
Exemple #3
0
        public int Create(FOrder ent)
        {
            int       createdid = 0;
            FOrderDAO entDAO    = new FOrderDAO();

            sc             = new SqlCommand("CreateFOrder");
            sc.CommandType = CommandType.StoredProcedure;
            addParameters(ent);
            createdid = entDAO.createEntity(sc);
            return(createdid);
        }