示例#1
0
        public void Current_User(string _userName, string _password)
        {
            var check_user = from i in context.Accounts
                             where i.AccountName == _userName
                             select i;

            foreach (var item in check_user)
            {
                if (_userName == item.AccountName && _password == item.AccountPassword)
                {
                    CurrentAccoutId = from i in context.Accounts
                                      where i.AccountName == _userName
                                      select i.Id;

                    AddCategory form = new AddCategory();

                    form.Show();
                }
                else
                {
                    MessageBox.Show("this name not found");
                }
            }
        }
示例#2
0
        private void btn_edit_addNewCategory_Click(object sender, EventArgs e)
        {
            AddCategory AddCategoryForm = new AddCategory();

            AddCategoryForm.ShowDialog();
        }