Beispiel #1
0
        public void loadContract()
        {
            dgvPackage.RowTemplate.Height = 40;
            dgvPackage.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            dgvPackage.AllowUserToAddRows = false;
            dgvPackage.EditMode           = DataGridViewEditMode.EditProgrammatically;

            DataTable empDT = new DataTable();

            txtIDSeller.Text = GLOBAL.username.ToUpper();
            empDT            = emp.getEmployeebyID(GLOBAL.username);
            if (empDT.Rows.Count > 0)
            {
                txtNameSeller.Text = empDT.Rows[0][3].ToString() + " " + empDT.Rows[0][4].ToString();
            }
            else
            {
                txtNameSeller.Text = "Admin";
            }
            //Lấy KH và Contract ID tự động
            ContractBL conbl = new ContractBL();

            txtIDContract.Text = conbl.loadIDContract();
            txtIDMember.Text   = conbl.loadIDMEMBER();
            txtUserID.Text     = txtIDMember.Text;
        }
Beispiel #2
0
        private void dgvSearchMember_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int index = dgvSearchMember.CurrentCell.RowIndex;

            GETMember.IDMember = dgvSearchMember.Rows[index].Cells[0].Value.ToString();
            txtIsMember.Text   = GETMember.IDMember;
            ContractBL conbl = new ContractBL();

            txtIsContract.Text = conbl.loadIDContract();
            loadDVG(dgvSearchContract);
            dgvSearchContract.DataSource = mem.getRenewMemberByID(GETMember.IDMember);
        }