public void run(IControllerBase ctl)
        {
            var main = (HomeController)ctl;
            user = main.User;

            reportName = main.ReportName;

            main.Body.Controls.Clear();
            main.Body.Controls.Add(view);

            if (reportName == "customer_report")
            {
                view.dtFromDate.Enabled = false;
                view.dtEndDate.Enabled = false;
                view.chkAll.Enabled = false;
                view.cbBrand.Enabled = false;
            }
            else
            {
                brandModel = new BrandModel();

                view.cbBrand.DataSource = brandModel.getBrands();
                view.cbBrand.DisplayMember = "BrandName";
                view.cbBrand.ValueMember = "BrandID";
            }
        }
 public void run(IControllerBase ctl)
 {
     var main = (HomeController)ctl;
     user = main.User;
     brandId = main.BrandID;
     view.ShowDialog();
 }
        public void run(IControllerBase ctl)
        {
            var main = (HomeController)ctl;
            user = main.User;
            company = main.Company;

            view.txtCompanyName.Text = company.Name;
            view.txtDescription.Text = company.Desciption;

            vcommon.ShowDialog();
        }
        public void run(IControllerBase ctl)
        {
            var main = (HomeController)ctl;

            user = main.User;
            brandId = main.BrandID;

            main.Body.Controls.Clear();
            main.Body.Controls.Add(view);

            bindingPartList();

            //Binding Control Data
            view.txtLocG.DataBindings.Add("Text", view.bsPartList, "LocG");
            view.txtLocIM.DataBindings.Add("Text", view.bsPartList, "LocIM");
            view.txtComment.DataBindings.Add("Text", view.bsPartList, "Comment");

            view.txtLocG.Leave += new EventHandler(txtLocG_Leave);
            view.txtLocIM.Leave += new EventHandler(txtLocIM_Leave);
            view.txtComment.Leave += new EventHandler(txtComment_Leave);
        }
 public void run(IControllerBase ctl)
 {
     var main = (HomeController)ctl;
     user = main.User;
     vcommon.ShowDialog();
 }
        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();
        }