示例#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();
        }
示例#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;
        }
示例#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();
        }
示例#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);
        }
示例#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);
 }
示例#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;
            }
        }
示例#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;
        }
示例#8
0
 public UC_UCUI_Master_Category_UC_Category()
 {
     this._presenter = new CategoryPresenter(this);
 }
示例#9
0
 public frmAddCategory(CategoryPresenter preCategory, Form beforeForm)
 {
     this.preCategory = preCategory;
     this.beforeForm  = beforeForm;
     InitializeComponent();
 }
示例#10
0
 public frmAddCategory(CategoryPresenter preCategory)
 {
     this.preCategory = preCategory;
     InitializeComponent();
 }
示例#11
0
 public frmAddCatogory()
 {
     InitializeComponent();
     categoryPresenter = new CategoryPresenter(this);
 }