private void btnSyncDept_Click(object sender, RoutedEventArgs e)
        {
            ServerCommandProxy serverProxy;
            OperationTypeEnum  operation = OperationTypeEnum.SyncDepartment;

            txtblockOutput.Inlines.Clear();

            try
            {
                ValidationResult result = ValidateInput(operation);

                if (result.IsValid)
                {
                    string ppcHostname = txtboxPpcServer.Text;
                    string ppcAdminPw  = pwdboxPpcAdminPw.Password;

                    serverProxy = new ServerCommandProxy(ppcHostname, 9191, ppcAdminPw);

                    if (PaperCutProxyWrapper.IsConnectionEstablished(serverProxy))
                    {
                        txtblockOutput.Inlines.Add(Constants.PaperCut.Messages.PaperCutConnectionEstablished);

                        string domainName    = txtboxDomainName.Text;
                        string ldapRoot      = txtboxLdapRoot.Text;
                        string domainUser    = txtboxDomainUser.Text;
                        string domainUserPwd = pwdboxDomainUserPwd.Password;

                        LdapHelper ldapHelper = new LdapHelper(domainName, ldapRoot, domainUser, domainUserPwd);

                        if (ldapHelper.IsConnectionEstablished(domainUser))
                        {
                            txtblockOutput.Inlines.Add(Constants.Ldap.Messages.LdapConnectionEstablished);

                            PaperCutUser[] ppcUsers = PaperCutProxyWrapper.GetUsersDepartmentInfo(serverProxy);

                            int    targetDeptField         = cmboxTargetDeptField.SelectedIndex;
                            string departmentNameADField   = txtboxDeptNameADField.Text;
                            string departmentNumberADField = txtboxDeptNumberADField.Text;

                            bool areBothAdFieldsEntered = !string.IsNullOrEmpty(departmentNameADField) &&
                                                          !string.IsNullOrEmpty(departmentNumberADField);

                            if (areBothAdFieldsEntered)
                            {
                                LdapUser[] ldapUsers = ldapHelper.RetrieveDepartmentInformation(ppcUsers, departmentNameADField, departmentNumberADField);
                                PaperCutProxyWrapper.SetUsersMultipleDepartmentInfo(serverProxy, ldapUsers, targetDeptField);
                            }
                            else
                            {
                                LdapUser[] ldapUsers = ldapHelper.RetrieveDepartmentInformation(ppcUsers, string.IsNullOrEmpty(departmentNameADField) ?
                                                                                                departmentNumberADField : departmentNameADField);
                                PaperCutProxyWrapper.SetUsersSingleDepartmentInfo(serverProxy, ldapUsers, targetDeptField);
                            }
                        }
                        else
                        {
                            txtblockOutput.Inlines.Add(Constants.Ldap.Messages.LdapConnectionNotEstablished);
                        }
                    }
                    else
                    {
                        txtblockOutput.Inlines.Add(Constants.PaperCut.Messages.PaperCutConnectionNotEstablished);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }