protected override String doSelectedItem(studentSpec aStudentSpec)
        {
            if (aStudentSpec.QLId != "")
            {
                String FullName = aStudentSpec.Forename + " " + aStudentSpec.Surname;
                //String Password = "******";
                //String ExpireDate = "none";
                String Description      = "Changed on " + DateTime.Now;
                String wNewStaffJRBText = "";
                wNewStaffJRBText +=
                    "\"" + aStudentSpec.NDSName + "\"" + "," + "\"" + aStudentSpec.Surname.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Forename.ToUpper() + "\"" +
                    "," + "\"" + FullName.ToUpper() + "\"" + "," + "\"" + aStudentSpec.Department.ToUpper() + "\"" +
                    //"," + "\"" + aStudentSpec.Site.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Description.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.MaxConnections.ToString() + "\"" + "," + "\"" + aStudentSpec.EmailAddress.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Telephone.ToString().Trim() + "\""; //+
                //"," + "\"" + aStudentSpec.VolumeRestrictions.ToString().Trim() + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
 protected override String doSelectedItem(studentSpec aStudentSpec)
 {
     if (aStudentSpec.QLId != "")
     {
         String   Password    = ""; //default
         String   Description = "Disabled on " + DateTime.Now;
         String[] AD          = aStudentSpec.ActionData.Split('=');
         if (AD[0].ToString() == "Password")  // generated by StaffActivate
         {
             Password = AD[1].ToString();
             if (Password != "")
             {
                 Description = "Trashed on " + DateTime.Now;
             }
         }
         String wNewStaffJRBText =
             "\"" + aStudentSpec.NDSName + "\"" +
             "," + "\"" + Password + "\"" +
             "," + "\"" + Description + "\"";
         return(wNewStaffJRBText);
     }
     else
     {
         return("");
     }
 }
 protected override String doSelectedItem(studentSpec aStudentSpec)
 {
     if (aStudentSpec.QLId != "")
     {
         String wNewStaffJRBText =
             "." + aStudentSpec.NDSName.Trim() + ".po-students.students.groupwise.wc";
         return(wNewStaffJRBText);
     }
     else
     {
         return("");
     }
 }
 protected override String doSelectedItem(studentSpec aStudentSpec)
 {
     if (aStudentSpec.QLId != "")
     {
         String wNewStaffJRBText =
             "." + aStudentSpec.NDSName.Trim() + "." +
             aStudentSpec.PreContext.Trim() + " " +
             "." + aStudentSpec.Context.Trim();
         return(wNewStaffJRBText);
     }
     else
     {
         return("");
     }
 }
 protected override String doSelectedItem(studentSpec aStudentSpec)
 {
     if (aStudentSpec.QLId != "")
     {
         /*
          * Use site name, e.g. Rugby, Trident, henley in arden and check
          * coupler table for more recent un-processed ChangeSiteNDS messages
          * for a move to any site. If there is one, ignore, as this is
          * probably a duplicate request.
          */
         String   wNewStaffJRBText = "Change site for " + aStudentSpec.NDSName;
         bool     doChangeSite     = true;
         DataView dv = studentUtility.couplerDV(
             "WHERE " +
             "(c.whenDone IS NOT NULL) AND " +
             "(c.action='ChangeSiteNDS') AND " +
             "(NDSName='" + aStudentSpec.NDSName + "') AND " +
             "(c.queueItem=" + aStudentSpec.queueItem.ToString() + ")"
             );
         if (dv != null)
         {
             if (dv.Count > 0)
             {
                 doChangeSite = false;
             }
         }
         if (doChangeSite)
         {
             String FullName = aStudentSpec.Forename + " " + aStudentSpec.Surname;
             bool   wB       = studentUtility.sendEmail(
                 "[email protected];" + aStudentSpec.EmailAddress,
                 "*****@*****.**",
                 "Staff Site Change : " + aStudentSpec.NDSName,
                 FullName + "( " + aStudentSpec.NDSName + " ) has indicated a need " +
                 "to change site to " + aStudentSpec.ActionData.Replace("NewSite=", "") + ". " +
                 "Please log a sitehelpdesk job for the network team (infra_op) for this and notify the user when complete. " +
                 "These jobs are normally expected to complete within 2 working days.",
                 null
                 );
             return(wNewStaffJRBText + ".");
         }
         return(wNewStaffJRBText + " ignored.");
     }
     else
     {
         return("");
     }
 }
        protected override String doSelectedItem(studentSpec aStudentSpec)
        {
            if (aStudentSpec.QLId != "")
            {
                String Description      = "User details changed on " + DateTime.Now;
                String FullName         = aStudentSpec.Forename + " " + aStudentSpec.Surname;
                String grpName          = aStudentSpec.ActionData.Replace("Group=", "");
                String wNewStaffJRBText =
                    "\"" + aStudentSpec.NDSName + "\"" +
                    "," + "\"" + grpName.Trim() + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
        protected override String doSelectedItem(studentSpec aStudentSpec)
        {
            if (aStudentSpec.QLId != "")
            {
                /*
                 * Currently a stub procedure
                 *
                 * 1. Send email to IT Services advising
                 *   of need to change login.
                 * 2. Create pending wcStaffIdentity record
                 *   by cloning current one but set
                 *   IsPending='Y' and NDSName to new value.
                 */
                String   FullName   = aStudentSpec.Forename + " " + aStudentSpec.Surname;
                String   NewNDSName = "";
                String[] AD         = aStudentSpec.ActionData.Split('=');
                if (AD[0].ToString() == "NewNDS")
                {
                    NewNDSName = AD[1].ToString();
                }

                bool wB = studentUtility.sendEmail(
                    "[email protected];[email protected];" + aStudentSpec.EmailAddress,
                    "*****@*****.**",
                    "Staff Login Change : " + aStudentSpec.NDSName,
                    FullName + "( " + aStudentSpec.NDSName + " ) has indicated a need " +
                    "to change login to " + NewNDSName + ". " +
                    "Please log a sitehelpdesk job for the network team (infra_op) for this and notify the user when complete. " +
                    "These jobs are normally expected to complete within 4 working days.",
                    null
                    );

                return
                    ("Change login processed for " + aStudentSpec.NDSName);
            }
            else
            {
                return("");
            }
        }
        protected override String doSelectedItem(studentSpec aStudentSpec)
        {
            if (aStudentSpec.QLId != "")
            {
                String   FullName   = aStudentSpec.Forename + " " + aStudentSpec.Surname;
                String   ExpireDate = "none";
                String   Password   = "";           //default
                String[] AD         = aStudentSpec.ActionData.Split('=');
                if (AD[0].ToString() == "Password") // generated by StaffActivate
                {
                    Password = AD[1].ToString();
                }
                String Description      = "Updated on " + DateTime.Now;
                String wNewStaffJRBText =
                    // "!Template=" + aStudentSpec.Template + "\n" +
                    "!Name context = " + "users" + aStudentSpec.Context + "\n";
                wNewStaffJRBText +=
                    "\"" + aStudentSpec.NDSName + "\"" + "," + "\"" + aStudentSpec.Surname.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Forename.ToUpper() + "\"" +
                    "," + "\"" + Password + "\"" +
                    "," + "\"" + FullName.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Department.ToUpper() + "\"" +
                    //"," + "\"" + aStudentSpec.Site.ToUpper() + "\"" +
                    //"," + "\"" + aStudentSpec.JobTitle.ToUpper() + "\"" +
                    // "," + "\"" + aStudentSpec.Tel + "\"" + "," + "\"" + aStudentSpec.EmailAddress.ToUpper() + "\"" +
                    "," + "\"" + Description + "\"" +
                    // "," + "\"" + aStudentSpec.StaffID + "\"" +
                    "," + "\"" + ExpireDate + "\"";
                //"," + "\"" + aStudentSpec.HomeVolRestrict + "\"" +
                //"," + "\"" + aStudentSpec.SharedVolRestrict + "\"" +
                //"," + "\"" + aStudentSpec.Vol1VolRestrict + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
        protected override String doSelectedItem(studentSpec aStudentSpec)
        {
            if (aStudentSpec.QLId != "")
            {
                String FullName = aStudentSpec.Forename + " " + aStudentSpec.Surname;
                //String Password = "******";
                //String ExpireDate = "none";
                String Description      = "Created on " + DateTime.Now;
                String wNewStaffJRBText =
                    // "!Template=" + aStudentSpec.Template + "\n" +
                    "!Name context = " + aStudentSpec.Context + "\n" +
                    "!Home directory volume=" + aStudentSpec.HomeVol + "\n" +
                    "!Home directory path=users\n" +
                    "!Use two passes=y\n";
                //if (aStudentSpec.GWise)
                //    wNewStaffJRBText +=
                //        "!Groupwise add users=y" + "\n" +
                //        "!Groupwise domain object=.students.groupwise.wc" + "\n" +
                //        "!Groupwise post office=po-students2" + "\n";
                wNewStaffJRBText +=
                    "\"" + aStudentSpec.NDSName + "\"" + "," + "\"" + aStudentSpec.Surname.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Forename.ToUpper() + "\"" + "," + "\"" + aStudentSpec.Password.ToString() + "\"" +
                    "," + "\"" + FullName.ToUpper() + "\"" + "," + "\"" + aStudentSpec.Department.ToUpper() + "\"" +
                    //"," + "\"" + aStudentSpec.Site.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Description.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.MaxConnections.ToString() + "\"" + "," + "\"" + aStudentSpec.EmailAddress.ToUpper() + "\"" +
                    "," + "\"" + aStudentSpec.Telephone.ToString().Trim() + "\""; //  +
                // "," + "\"" + aStudentSpec.VolumeRestrictions.ToString().Trim() + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
 protected virtual String doSelectedItem(studentSpec aStudentSpec)
 {
     return("");
 }