Ejemplo n.º 1
0
 public EmployeeListUI(EmployeeUI frmEmployee)
 {
     InitializeComponent();
     employeeRepository = EntityContainer.GetType <IEmployeeRepository>();
     this.frmEmployee   = frmEmployee;
     formActive         = "Employee";
 }
        public List <EmployeeUI> ConvertToEmployeesUi(List <Employee> employeeList, Action <EmployeeUI> offerShiftCallback)
        {
            var employeeUIs = new List <EmployeeUI>();

            if (employeeList == null)
            {
                return(employeeUIs);
            }

            foreach (var employee in employeeList)
            {
                var employeeUi = new EmployeeUI
                {
                    Id                 = employee.Id,
                    Name               = $"{employee.FirstName} {employee.LastName}",
                    ProfilePicture     = employee.ProfilePictureUrl,
                    Skills             = employee.Skills,
                    SkillsString       = employee.Skills.Select(skill => skill.Name).ToList(),
                    Selected           = false,
                    IsInTalentPool     = employee.IsInTalentPool,
                    VideoUrl           = employee.VideoUrl,
                    ThumbsUp           = employee.ThumbsUp,
                    ThumbsDown         = employee.ThumbsDown,
                    Nationality        = employee.Nationality,
                    OfferShiftCallback = offerShiftCallback
                };
                employeeUIs.Add(employeeUi);
            }
            return(employeeUIs);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// With data.
 /// </summary>
 /// <param name="driver">driver.</param>
 /// <param name="name">name.</param>
 /// <param name="email">email.</param>
 /// <param name="address">address.</param>
 /// <param name="phone">phone.</param>
 public static void WithTheData(IWebDriver driver, string name, string email, string address, string phone)
 {
     Enter.Text(driver, EmployeeUI.GetNameInput(), name);
     Enter.Text(driver, EmployeeUI.GetEmailInput(), email);
     Enter.Text(driver, EmployeeUI.GetAddressTextArea(), address);
     Enter.Text(driver, EmployeeUI.GetPhoneInput(), phone);
     Click.On(driver, EmployeeUI.GetAddButton());
 }
Ejemplo n.º 4
0
        private void tsbEmployee_Click(object sender, EventArgs e)
        {
            var frmEmployee = new EmployeeUI();

            frmEmployee.MdiParent = this;

            frmEmployee.Show();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            //DepartmentUI departmentUI = new DepartmentUI();
            //departmentUI.Demo();

            EmployeeUI employeeUI = new EmployeeUI();

            employeeUI.Run();

            //ArrayExample arrayExample = new ArrayExample();
            //arrayExample.Demo();
        }
        private void ItemSelectedAction(EmployeeUI employeeUi)
        {
            if (!WasViewModelInitialized)
            {
                return;
            }

            if (employeeUi == null)
            {
                return;
            }

            RefreshUi();
            mOnUpdateTextAction();
        }
 public AddItem(EmployeeUI employeeUI, MainWindow window)
 {
     InitializeComponent();
     EmployeeUI = employeeUI;
     Window     = window;
 }
Ejemplo n.º 8
0
 public MainWindow()
 {
     InitializeComponent();
     EmployeeUI = new EmployeeUI(new TransactionManager(), new ItemManager(), new EmployeeManager());
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Form.
 /// </summary>
 /// <param name="driver">driver.</param>
 /// <returns>boolean.</returns>
 public static bool Form(IWebDriver driver)
 {
     return(WaitUntil.ElementIsPresent(driver, EmployeeUI.GetForm()));
 }
Ejemplo n.º 10
0
        public void BankLoginOptions()
        {
            employeeUI = new EmployeeUI(new EmployeeService());
            holderUI   = new AccountHolderUI(new AccountService());
            switch (EnumHelper.ConvertInEnum <LoginOption>(LoginUI.SelectLoginOption()))
            {
            case LoginOption.AdminLogin:
                bool result = adminUI.AdminLoginDisplay();
                if (result == true)
                {
                    EmployeeRelatedOption();
                }
                else
                {
                    BankLoginOptions();
                }
                break;

            case LoginOption.BankStaffLogin:

                bool Result = employeeUI.EmployeeLoginDisplay();
                if (Result == true)
                {
                    AccountHolderRelatedOption();
                }
                else
                {
                    BankLoginOptions();
                }
                break;

            case LoginOption.AccountHolderLogin:
                if (MasterBank.currentBank.accounts.Count == 0)
                {
                    DisplayHelper.PrintTextAtXY(65, 22, "THERE IS NO ACCOUNT HOLDER REGISTERED");
                    Thread.Sleep(1000);
                    BankLoginOptions();
                }
                else
                {
                    Result = holderUI.AccountLoginDisplay();
                    if (Result == true)
                    {
                        TransactionRelatedOption();
                    }
                    else
                    {
                        BankLoginOptions();
                    }
                }
                break;

            case LoginOption.ExitApplication:
                Thread.Sleep(1000);
                Environment.Exit(0);
                break;

            default:
                DisplayHelper.PrintTextAtXY(60, 22, "WRONG CHOICE ENTERED");
                Thread.Sleep(1000);
                BankLoginOptions();
                break;
            }
        }