Ejemplo n.º 1
0
        public AddItem(MDIMain mdi)
        {
            _mdi = mdi;

            InitializeComponent();
            listName.Text = UOW.Instance.RepToDoList.Get(p => p.Id == _mdi._doitemid).FirstOrDefault().Name;
        }
Ejemplo n.º 2
0
        private void btnLoginOk_Click(object sender, RoutedEventArgs e)
        {
            string a    = Hash.GetHashString(txtLoginPass.Text);
            User   ulog = UOW.Instance.RepUser.Get(p => p.UserName == txtLoginUser.Text && p.Password == a).FirstOrDefault();

            //  mdi = new MDIMain();
            mdi     = (MDIMain)Owner;
            mdi._id = ulog.Id;
            if (ulog != null)
            {
                MessageBox.Show("Login is Success");

                Anasayfa an = new Anasayfa(mdi);
                an.Owner = mdi;

                mdi.ViewWindow.Content = an.Content;



                Menu m = new Menu(mdi);
                m.Owner = mdi;
                mdi._id = ulog.Id;
                mdi.ViewMenu.Content = m.Content;
            }
            else
            {
                MessageBox.Show("Login is Fail! Try Again");
            }
        }
Ejemplo n.º 3
0
        public Menu(MDIMain mdi)
        {
            _mdi = mdi;


            InitializeComponent();
        }
Ejemplo n.º 4
0
        public NewList(MDIMain mdi)
        {
            _mdi = mdi;

            InitializeComponent();

            txtUser.Text = UOW.Instance.RepUser.Get(p => p.Id == _mdi._id).FirstOrDefault().UserName;
        }
Ejemplo n.º 5
0
        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            MDIMain mdi = (MDIMain)Owner;
            Login   log = new Login();

            log.Owner = mdi;
            mdi.ViewWindow.Content = log.Content;
        }
Ejemplo n.º 6
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MDIMain  mdi = (MDIMain)Owner;
            Register rgs = new Register();

            rgs.Owner = mdi;
            mdi.ViewWindow.Content = rgs.Content;
        }
Ejemplo n.º 7
0
        public ItemDetail(MDIMain mdi)
        {
            _mdi = mdi;
            InitializeComponent();
            Item item = UOW.Instance.RepItem.Get(p => p.Id == _mdi._itemid).FirstOrDefault();

            txtName.Text      = item.Name;
            DtPD.SelectedDate = (DateTime)item.EndDate;
            if (item.Status == Status.Completed)
            {
                ChkD.IsChecked = true;
            }
            else
            {
                ChkD.IsChecked = false;
            }
        }
Ejemplo n.º 8
0
        public Anasayfa(MDIMain mdi)
        {
            _mdi = mdi;

            //List<ToDoList> list = UOW.Instance.RepToDoList.Get(p => p.UserId == _mdi.user.Id);
            //  foreach (var item in list)
            //  {
            //      MainListBox.Items.Add(item.Name);
            //  }
            InitializeComponent();

            List <ToDoList> list = UOW.Instance.RepToDoList.Get(p => p.UserId == _mdi._id);

            txtWelcome.Text = list[0].User.UserName.ToString();
            MainListBox.Items.Clear();
            foreach (var item in list)
            {
                MainListBox.Items.Add(item.Name);
                listid.Items.Add(item.Id);
            }
        }
Ejemplo n.º 9
0
        private void btnRegister_Click(object sender, RoutedEventArgs e)
        {
            MDIMain mdi = (MDIMain)Owner;

            User u = new User();

            u.UserName = txtUserName.Text;
            u.CreateBy = txtUserName.Text;
            u.Password = Hash.GetHashString(txtPassword.Text);
            CrudState state = UOW.Instance.RepUser.Add(u);

            u = UOW.Instance.RepUser.Get().LastOrDefault();
            if (state == CrudState.Success)
            {
                MessageBox.Show("Account Registered");
                Anasayfa ana = new Anasayfa(mdi);

                ana.Owner = mdi;
                mdi.ViewWindow.Content = ana.Content;
            }
        }
Ejemplo n.º 10
0
 public Filter(MDIMain mdi)
 {
     _mdi = mdi;
     InitializeComponent();
 }