コード例 #1
0
        public void f_cmd_remove(object param)
        {
            WMain w = (WMain)param;

            f_openDialogSequence(w);
            OEntry.f_remove(_sqlExecuter, false, p_selectedMessage);
            f_closeDialogSequence(w);
        }
コード例 #2
0
        /// <summary>
        /// set sqlex and fill obscols
        /// </summary>
        private void f_initializeData()
        {
            try {
                //init sqlex to load out and manage the db content
                _sqlExecuter = new SQLExecuter(Path.Combine(Environment.CurrentDirectory, "data.accdb"));

                //fill item sources
                p_departments = OEntry.f_selectAndConvertData(_sqlExecuter, false, "");
            } catch (Exception exc) {
                throw exc;
            }
        }
コード例 #3
0
        public void f_cmd_apply(object param)
        {
            UCDepartment_AddEdit uc = (UCDepartment_AddEdit)param;


            string   name    = uc.c_tb_name.Text;
            string   message = uc.c_tb_message.Text;
            DateTime date    = DateTime.Now;


            OEntry.f_addEdit(_sqlExecuter, false, true, _selectedDepartment, name, message, date);

            f_closeDialogSequence();
        }
コード例 #4
0
        public UCMessage_AddEditCtrl(SQLExecuter sqlex, WMain wmain, OEntry o)
        {
            _wmain              = wmain;
            _sqlExecuter        = sqlex;
            _selectedDepartment = o;
            f_initializeData();

            //cmd
            p_cmd_apply  = new RelayCommand(f_cmd_apply);
            p_cmd_cancel = new RelayCommand(f_cmd_cancel);

            //pres
            UCDepartment_AddEdit uc = new UCDepartment_AddEdit(this);

            wmain.c_stack_form.Children.Add(uc);
            if (o != null)
            {
                uc.c_tb_name.SelectedText = o.p_name;
                uc.c_tb_message.Text      = o.p_message;
            }
        }