Exemplo n.º 1
0
        private void btn_login_Click(object sender, EventArgs e)
        {
            if (checkCode.ToLower() != txt_verificationCode.Text.ToLower())
            {
                MessageBox.Show("验证码错误,请重新输入!", "提示");
                return;
            }

            try
            {
                //从数据库取,然后验证
                if (SystemManageService.getInstance().validateUserNameAndPassword(txt_user.Text, txt_passwd.Text))
                {
                    this.DialogResult = System.Windows.Forms.DialogResult.OK;
                    LogService.getInstance().log(ModuleConstant.LOGIN_MODULE_CONTENT, ModuleConstant.LOGIN_MODULE);
                    this.Close();
                }
                else
                {
                    MessageBox.Show("用户名或者密码错误!", "提示");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "错误");
            }
        }
Exemplo n.º 2
0
 public void init()
 {
     smService = SystemManageService.getInstance();
     comboBoxEdit_type.Properties.Items.AddRange(smService.getTypes().ToArray());
     //设置ComboBoxEdit下拉不可编辑
     comboBoxEdit_type.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;
     comboBoxEdit_type.SelectedIndex            = 0;
 }
Exemplo n.º 3
0
        public SystemManageForm()
        {
            InitializeComponent();

            smService = SystemManageService.getInstance();
            comboBoxEdit_type.Properties.Items.AddRange(smService.getTypes().ToArray());
            //设置ComboBoxEdit下拉不可编辑
            comboBoxEdit_type.Properties.TextEditStyle = TextEditStyles.DisableTextEditor;


            pageUpControl.MyControl    = gridControl;
            pageUpControl.QueryService = smService;

            initData(formatWhere());
        }