예제 #1
0
        private void updateBtnP_clicked(object sender, EventArgs e)
        {
            if (this.textBox1.Text == "" || this.paswrdSetTBox.Text == "")
            {
                MessageBox.Show("Insert the data");
            }

            else
            {
                EmployeeR i = new EmployeeR();
                i.EmployeeId = this.textBox1.Text;
                i.EPassword  = this.paswrdSetTBox.Text;

                ItRepository p = new ItRepository();
                if (p.Update(i))
                {
                    List <EmployeeR> iList = p.GetAllEmployee();
                    this.dataGrid.DataSource = iList;


                    List <EmployeeR> allResult = p.GetAllEmployee();

                    this.textBox1.Text      = "";
                    this.paswrdSetTBox.Text = "";
                }
                else
                {
                    MessageBox.Show("Can Not Update Password", "Update Error");
                }
            }
        }
예제 #2
0
        private void PasswordTab_clicked(object sender, EventArgs e)
        {
            this.dataGrid.Visible  = true;
            this.groupBox1.Visible = true;

            ItRepository     p         = new ItRepository();
            List <EmployeeR> allResult = p.GetAllEmployee();

            this.dataGrid.DataSource = allResult;
        }
예제 #3
0
        private void PassSetBtn_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text != "")
            {
                Random r = new Random();
                int    s;
                s = r.Next(10000000, 90000000);
                string    x = Convert.ToString(s);
                EmployeeR i = new EmployeeR();



                ItRepository em = new ItRepository();
                if (em.countPass(x) == 1)
                {
                    MessageBox.Show("Can Not Update Employee", "Update Error");
                }
                else
                {
                    this.paswrdSetTBox.Text = x;
                }
            }
        }
예제 #4
0
 public ProductsController(ItRepository repository)
 {
     _repository = repository;
 }
 public ShopingCartsController(ItRepository repository)
 {
     _repository = repository;
 }