Ejemplo n.º 1
0
        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";
            }
        }
Ejemplo n.º 2
0
 public void run(IControllerBase ctl)
 {
     var main = (HomeController)ctl;
     user = main.User;
     brandId = main.BrandID;
     view.ShowDialog();
 }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 public void run(IControllerBase ctl)
 {
     var main = (HomeController)ctl;
     user = main.User;
     vcommon.ShowDialog();
 }
Ejemplo n.º 6
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();
        }