예제 #1
0
        public UserController()
        {
            userModel = new UserModel();

            vcommon = new dgCommon();
            vcommon.Width = 940;

            view = new ucUser();

            vcommon.Text = "User";
            view.Dock = DockStyle.Fill;

            vcommon.Controls.Add(view);

            vcommon.CancelButton = view.btnClose;

            view.dataGridView1.CellValueChanged += new DataGridViewCellEventHandler(dataGridView1_CellValueChanged);

            view.dataGridView1.DataError += new DataGridViewDataErrorEventHandler(dataGridView1_DataError);

            view.bindingSource1.DataSource = userModel.getAllUsers();

            view.toolBtnDelete.Click += new EventHandler(toolBtnDelete_Click);
            view.btnClose.Click += new EventHandler(btnClose_Click);
        }
예제 #2
0
        public CompanyController()
        {
            companyModel = new CompanyModel();

            vcommon = new dgCommon();
            vcommon.Width = 500;

            view = new ucCompany();

            vcommon.Text = "Company Informaion";
            view.Dock = DockStyle.Fill;

            vcommon.Controls.Add(view);

            vcommon.AcceptButton = view.btnOK;

            view.btnOK.Click += new EventHandler(btnOK_Click);
        }