Пример #1
0
        public OfficerEdit(OfficerList ol)
        {
            InitializeComponent();
            this.cv = "insert";
            this.ol = ol;
            CustomerDao cus = new CustomerDao();

            txtOfficerID.Text = (ol.listo.Count() + 1).ToString();
            txtCustID.Text    = (cus.getAll().Count + 1).ToString();
        }
Пример #2
0
        public OfficerEdit(OFFICER o, OfficerList ol)
        {
            InitializeComponent();
            this.cv = "update";
            this.ol = ol;
            CustomerDao cd  = new CustomerDao();
            CUSTOMER    cus = new CUSTOMER();

            cus               = cd.SelectbyId(o.CUST_ID);
            txtAdress.Text    = cus.ADDRESS;
            txtCity.Text      = cus.CITY;
            txtCustType.Text  = cus.CUST_TYPE_CD;
            txtFedID.Text     = cus.FED_ID;
            txtPostcode.Text  = cus.POSTAL_CODE;
            txtState.Text     = cus.STATE;
            txtFirstname.Text = o.FIRST_NAME;
            txtLastname.Text  = o.LAST_NAME;
            txtTitle.Text     = o.TITLE;
            DateEnd.Text      = o.END_DATE.ToString();
            StartDate.Text    = o.START_DATE.ToString();
            txtOfficerID.Text = o.OFFICER_ID.ToString();
            txtCustID.Text    = o.CUST_ID.ToString();
        }