public SuplierDTO LoadOneSuplier(int id)
        {
            SuplierDAO dao    = new SuplierDAO();
            SuplierDTO result = dao.loadSuplierByID(id);

            return(result);
        }
Esempio n. 2
0
        private void LoadInfo(int id)
        {
            SuplierBUS bus    = new SuplierBUS();
            SuplierDTO result = bus.LoadOneSuplier(id);

            txtID.Content   = result.ID.ToString();
            txtName.Text    = result.Name;
            txtEmail.Text   = result.Email;
            txtPhone.Text   = result.Phone;
            txtAddress.Text = result.Address;
        }
        public void UpdateSuplier(SuplierDTO suplier)
        {
            SuplierDAO dao = new SuplierDAO();

            dao.updateSuplier(suplier);
        }
        public int AddNewSuplier(SuplierDTO suplier)
        {
            SuplierDAO dao = new SuplierDAO();

            return(dao.AddNewSuplier(suplier));
        }