コード例 #1
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);
        }
コード例 #2
0
        public void run(IControllerBase ctl)
        {
            var login = (LoginController)ctl;
            user = login.User;
            view.toolStripStatusLabel1.Text = "User: "******" " + user.LastName;

            //admin only manage user
            enable_menu_admin(user.RoleAdmin == 1);

            //company
            CompanyModel companyModel = new CompanyModel();
            company = companyModel.getCompany();

            view.Text = company.Name + " - Version 1.2.1";

            view.Show();
        }