why standard valuation matrix is not the best way to value great businesses
Program
1. using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Net.Mail;
using System.Net;
using System.Text.RegularExpressions;
//This program is to obtain the information of students name, ID number,
date of birth, major and email address from missingmaterials.csv file,
and then
//send a thank you letter to each student by their email address provided
namespace MissMaterial
{
class Program
{
static void Main(string[] args)
{
string line;
int counter = 0;
StreamReader file = new
StreamReader(@"C:Dellmissingmaterials.csv"); //read the content of csv
file
String ID = "";
String DateOfBirth = "";
String FullName = "";
String ProgramName = "";
String Email = "";
line = file.ReadLine(); //read line by line // read the
first line
while ((line = file.ReadLine()) != null) //if the line is
not exist and start reading from second line
{
string[] values = line.Split(','); //the column of csv
file default seperated by comma, then store each column into array called
values.
ID = values[1];
DateOfBirth = values[values.Length - 3];
FullName = values[3] + " " + values[4];
ProgramName = values[2];
List<string> requirements = new List<string>(); //create
a new list called requirements
try
{
Email = values[values.Length - 1]; //school's
goldmail address
if (String.IsNullOrEmpty(Email)) //if this student do
not goldmail address
2. {
Email = values[values.Length - 2]; // personal
email address
}
}
catch (FormatException e) //error
{
}
for (int i = 5; i < values.Length - 3; i++)
//requirement column, seperated by
{
String a = values[i].Replace('"', ' ').Trim();
requirements.Add(a);
}
//check whether the format of the email address is
corrected or not.
bool check = Regex.IsMatch(Email, @"A(?:[a-z0-
9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-
9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)Z",
RegexOptions.IgnoreCase);
if (check == true) //if the email address is corrected
{
displayEmail(ID, DateOfBirth, FullName, ProgramName,
requirements, Email); //called displayEmail method
}
else
{
Console.WriteLine("wrong format"); //display error
message
}
Console.WriteLine(" ");
counter++;
}
file.Close();
Console.ReadLine();
}
private static string ProgramSpecalist(string ProgramName)
//each major is corresponded to its own program specialist.
{
String ps = "";
if (ProgramName.Equals("TESO-C4") ||
ProgramName.Equals("SOWK-MSW") || ProgramName.Equals("MATH-MS") ||
ProgramName.Equals("ENGL-MA") || ProgramName.Equals("ECEE-
C4")||ProgramName.Equals("APPS-MA")||ProgramName.Equals("TECM-MS") ||
ProgramName.Equals("AADM-C4") || ProgramName.Equals("MATH-MA") ||
ProgramName.Equals("APPS-C4") || ProgramName.Equals("CSCI-MS"))
{
3. ps = " Your Program Specialist is Kimberly Brockman.
Please contact her at brockmank@etsu.edu regarding these missing
materials and all other matters related to your application. ";
}
else if (ProgramName.Equals("DGMK-MS") ||
ProgramName.Equals("GCBA-C4") || ProgramName.Equals("EPRL-C4") ||
ProgramName.Equals("EDLR-MED") || ProgramName.Equals("EDLR-EDS") ||
ProgramName.Equals("EDLR-EDD") || ProgramName.Equals("BAMN-MBA") ||
ProgramName.Equals("ACCT-MACC") || ProgramName.Equals("AMBA-MBA") ||
ProgramName.Contains("EDLR"))
{
ps = " Your Program Specialist is Cindy Hill. Please
contact her at hillcc@etsu.edu regarding these missing materials and all
other matters related to your application. ";
}
else if (ProgramName.Equals("BMED-PHD"))
{
ps = " Your Program Specialist is Shella Bennett. Please
contact her at bennetsg@etsu.edu regarding these missing materials and
all other matters related to your application. ";
}
else if (ProgramName.Equals("PCOM-MA") ||
ProgramName.Equals("NMST-MA") || ProgramName.Equals("HIST-MA") ||
ProgramName.Equals("GEOS-MS") || ProgramName.Equals("CJCR-MA") ||
ProgramName.Equals("SOAA-MA") || ProgramName.Equals("PUAD-MPA") ||
ProgramName.Equals("PSYD-PHD") || ProgramName.Equals("CHEM-MS") ||
ProgramName.Equals("ECOD-C4") || ProgramName.Equals("GEOS"))
{
ps = " Your Program Specialist is Angela Edwards. Please
contact her at EDWARDAG@etsu.edu regarding these missing materials and
all other matters related to your application. ";
}
else if (ProgramName.Equals("PROS-MPS") ||
ProgramName.Equals("PHYT-DPT") || ProgramName.Equals("EVHE-MEH") ||
ProgramName.Equals("EPDM-C4") || ProgramName.Equals("BIOL-MS")
||ProgramName.Equals("ASGC-C4") || ProgramName.Equals("AHEA-MSAH") ||
ProgramName.Contains("PHEA") || ProgramName.Equals("CLIN-MS") ||
ProgramName.Equals("HCMT-C4") || ProgramName.Equals("MALS-MALS"))
{
ps = " Your Program Specialist is Mary Duncan. Please
contact her at duncanm@etsu.edu regarding these missing materials and all
other matters related to your application. ";
}
else if (ProgramName.Equals("SECD-C4") ||
ProgramName.Equals("TEML-MAT") || ProgramName.Equals("SPED-MED") ||
ProgramName.Equals("SMED-MED") || ProgramName.Equals("SCLP-C4") ||
ProgramName.Equals("READ-MA") || ProgramName.Equals("CNSL-MA") ||
ProgramName.Equals("ASTL-MED") || ProgramName.Equals("ECED-MA") ||
ProgramName.Equals("EDMT-MED") || ProgramName.Equals("KSPS-MA"))
{
ps = " Your Program Specialist is Fiona Goodyear. Please
contact her at goodyear@etsu.edu regarding these missing materials and
all other matters related to your application. ";
}
4. else if (ProgramName.Equals("NURS-DNP") ||
ProgramName.Equals("NURS-MSN") || ProgramName.Equals("RMSN-MSN") ||
ProgramName.Equals("FNPR-C4"))
{
ps = " Your Program Specialist is Linda Raines. Please
contact her at raineslt@etsu.edu regarding these missing materials and
all other matters related to your application. ";
}
else if (ProgramName.Equals("UDEG"))
{
ps = " Your Program Specialist is Megan Miller. Please
contact her at millerme2@etsu.edu regarding these missing materials and
all other matters related to your application.";
}
else {
ps = " Please contact Jacob Ferguson at
fergusonja@etsu.edu for more information.";
}
return ps;
}
//this method also responsible for sending the thank you
letter to each student after obtaining the student's information.
public static void displayEmail(String ID, String DateOfBirth,
String FullName, String ProgramName, List<string> requirements, String
email)
{
String r = "";
for (int i = 0; i < requirements.Count; i++)
{
r += "t" + requirements[i] + "n";
}
//Thank you letter to each student.
String content = "Student Identification Number: " + ID +
"n" +
"Date of Birth: " + DateOfBirth + "nn" +
"Dear " + FullName + ":" + "nn" +
"This letter is an update from the School of
Graduate Studies to inform you that your application status is currently
incomplete." +
" We are pleased that you have made an
application for admission into the " + ProgramName + " for the Spring
2016 Term. We are eager " +
"to assist you in completing your graduate
application so you can be considered for admission." + "nn" +
"According to our records, your Program
Specialist must receive the following materials before we can continue
processing your application. " + "nn" +
"t" + "Missing Credentials:" + "n" +
r + "n" +
ProgramSpecalist(ProgramName) + "nn" +
5. "- If you are missing college transcripts,
you should be aware that we review only official transcripts – those
issued by an educational institution and sealed in a college or
university envelope. " + "nn" +
"- If you have made an online application
and have sent application materials recently to the School of Graduate
Studies, you can check your application status at:
https://selfserv.etsu.edu/pls/PROD/bwskalog.P_DispLoginNon " + "nn" +
"- If you have made a paper application, you
can check with your graduate Program Specialist, as listed above." +
"nn" +
"- Please check the graduate catalog for
deadlines for applying to your chosen graduate program. The catalog is
available online at http://catalog.etsu.edu/index.php?catoid=8 " + "nn"
+
"We look forward to receiving all of your
application materials. If we can assist you further, please do not
hesitate to contact us." + "nn" +
"Sincerely," + "nn" +
"School of Graduate Studies" + "n" +
"Box 70720" + "n" +
"309 Burgin Dossett Hall" + "n" +
"East Tennessee State University" + "n" +
"Johnson City, TN 37614" + "nn" +
"P.S. You currently do not have an ETSU
Goldmail address. You may activate your Goldmail account at
http://www.etsu.edu/activate/ two days after you've paid your application
fee.";
// send the information above to each students' email address
below
MailMessage mm = new MailMessage();
mm.To.Add(email);
mm.From = new MailAddress("fergusonja@mail.etsu.edu");
mm.Subject = "Material Missing from Graduate School
Application"; //subject of the email
mm.Body = content; //body content in the email
SmtpClient client = new SmtpClient();
client.Host = "smtp.mandrillapp.com";
//Email provider port
client.Port = 587;
client.EnableSsl = true;
client.Credentials = new
System.Net.NetworkCredential("fergusonja@mail.etsu.edu",
"3cnlddGW1KTrbhcd4Dn39A");
client.Send(mm);
}
}
}