Пример #1
0
        void Reload_Data()
        {
            var ls = TM.GetListOfDriver();

            dgvDriverData.DataSource = ls;
            var ls2 = TM.GetListOfAccount().Where(s => s.TYPEID == 2).ToList();

            dgvAccountDriver.AutoGenerateColumns = false;
            dgvAccountDriver.DataSource          = ls2;
        }
Пример #2
0
        private void FormDriver_Load(object sender, EventArgs e)
        {
            //load info of Driver signed in
            var ls = TM.GetListOfDriver();
            var rs = ls.Where(s => s.ID == id).SingleOrDefault();

            if (rs != null)
            {
                lblFullname.Text = rs.NAME;
                lblIDCard.Text   = rs.IDCARD;
                lblAddress.Text  = rs.ADDRESS;
                lblPhone.Text    = rs.PHONE;
            }
        }
Пример #3
0
        private void Menu_Load(object sender, EventArgs e)
        {
            //load list driver
            var ls = TM.GetListOfDriver();

            dgvDriverData.DataSource = ls;

            //load list account driver
            var ls2 = TM.GetListOfAccount().Where(s => s.TYPEID == 2).ToList();

            dgvAccountDriver.AutoGenerateColumns = false;
            dgvAccountDriver.DataSource          = ls2;
            if (String.IsNullOrEmpty(txtFullname.Text))
            {
                btnDel.Enabled    = btnUpdate.Enabled = false;
                btnSubmit.Enabled = false;
            }
        }
Пример #4
0
        private void FormUpdateInfoDriver_Load(object sender, EventArgs e)
        {
            //when form load
            //load info of driver
            var ls = TM.GetListOfDriver();
            var rs = ls.Where(s => s.ID == id).SingleOrDefault();

            if (rs != null)
            {
                txtFullname.Text = rs.NAME;
                txtIDCard.Text   = rs.IDCARD;
                txtAddress.Text  = rs.ADDRESS;
                txtPhone.Text    = rs.PHONE;
            }
            else
            {
                btnUpdate.Enabled = false;
            }
        }