Exemplo n.º 1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            CategoryPresenter presenter    = new CategoryPresenter(this);
            VaildateUserInput ValidateUser = new VaildateUserInput();

            presenter.WriteFile(FileText, PasswordText, EmailText, CityText);
            if (!ValidateUser.ValidateInput(FileText, StateText, PasswordText, EmailText))

            {
                MessageBox.Show(("Must contain a value"), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            // Error Messages for category form
            string messageType = presenter.message;

            switch (messageType)
            {
            case "saved":
                MessageBox.Show("Settings Saved");
                break;

            case "noExist":
                MessageBox.Show("Input file does not exist");
                break;

            case "wrongFile":
                MessageBox.Show("Please select the correct file");
                break;
            }
            ScheduleForm schedule = new ScheduleForm();

            schedule.chkSelect.Items.Add(FileText);
            schedule.Show();
        }
Exemplo n.º 2
0
        public frmAddCategory(CategoryPresenter preCategory, Model.CATEGORY obj)
        {
            this.preCategory = preCategory;
            this.obj         = obj;
            InitializeComponent();

            edtCategoryName.Text        = obj.CATEGORY_NAME;
            edtCategoryDescription.Text = obj.DESCRIPTION;
        }
Exemplo n.º 3
0
        private void CategoryForm_Load(object sender, EventArgs e)
        {
            CategoryPresenter presenter = new CategoryPresenter(this);

            FileList  = new List <string>();
            StateList = new List <string>();
            presenter.GetCategories();
            presenter.GetStates();
        }
Exemplo n.º 4
0
        private void cboState_SelectedIndexChanged(object sender, EventArgs e)
        {
            CategoryPresenter presenter = new CategoryPresenter(this);

            CityList = new List <string>();
            string StateText = cboState.SelectedItem.ToString();
            string FileText  = cboCategory.SelectedItem.ToString();

            presenter.GetCity(StateText);
        }
Exemplo n.º 5
0
 public frmDelete()
 {
     InitializeComponent();
     categoriesPresenter    = new CategoriesPresenter(this);
     productGroupsPresenter = new ProductGroupsPresenter(this);
     productPresenter       = new ProductPresenter(this);
     productsPresenter      = new ProductsPresenter(this);
     productGroupPresenter  = new ProductGroupPresenter(this);
     categoryPresenter      = new CategoryPresenter(this);
 }
Exemplo n.º 6
0
        public frmCategory()
        {
            InitializeComponent();
            preCategory = new CategoryPresenter(this);

            GridView gridView = gridCategory.FocusedView as GridView;

            foreach (GridColumn col in gridView.Columns)
            {
                col.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;// .Settings.AutoFilterCondition = AutoFilterCondition.Contains;
            }
        }
Exemplo n.º 7
0
        public frmCategory()
        {
            InitializeComponent();
            preCategory = new CategoryPresenter(this);

            GridView gridView = gridCategory.FocusedView as GridView;

            foreach (GridColumn col in gridView.Columns)
            {
                col.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
            }

            gridView.GroupPanelText = "Thả một tiêu đề ở đây để nhóm thông tin";
            gridView.Columns["CATEGORY_CODE"].SortOrder = DevExpress.Data.ColumnSortOrder.Descending;
        }
Exemplo n.º 8
0
 public UC_UCUI_Master_Category_UC_Category()
 {
     this._presenter = new CategoryPresenter(this);
 }
Exemplo n.º 9
0
 public frmAddCategory(CategoryPresenter preCategory, Form beforeForm)
 {
     this.preCategory = preCategory;
     this.beforeForm  = beforeForm;
     InitializeComponent();
 }
Exemplo n.º 10
0
 public frmAddCategory(CategoryPresenter preCategory)
 {
     this.preCategory = preCategory;
     InitializeComponent();
 }
Exemplo n.º 11
0
 public frmAddCatogory()
 {
     InitializeComponent();
     categoryPresenter = new CategoryPresenter(this);
 }