Ejemplo n.º 1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            StaffManager manager = new StaffManagerImpl();

            Common.loggedUser = manager.getStaffById(Convert.ToInt32(textBox_userID.Text.Trim()),
                                                     Utility.getMD5Value(textBox_password.Text.Trim()));

            e.Result = Common.loggedUser;
        }
Ejemplo n.º 2
0
        private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            var          objectMap        = e.Argument as Dictionary <string, Object>;
            var          operationNewUser = (bool)objectMap["operation"];
            var          userObj          = objectMap["staffObj"] as Entity_Staff;
            StaffManager staffManager     = new StaffManagerImpl();

            if (operationNewUser)
            {
                e.Result = staffManager.addNewUser(userObj);
            }
            else
            {
                e.Result = false;
                if (staffManager.updateStaffDetails(userObj))
                {
                    if (!isAdminRequest)
                    {
                        Common.loggedUser = userObj;
                    }
                    e.Result = true;
                }
            }
        }
        private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            StaffManager staffmanager = new StaffManagerImpl();

            e.Result = staffmanager.updateStaffDetails(Common.loggedUser);
        }