예제 #1
0
    private Institute GetEmailAffiliation(string email)
    {
        string instName = string.Empty;

        if (email.Contains("campus.haifa"))
        {
            instName = "University of Haifa";
        }
        else if (email.Contains("ruppin."))
        {
            instName = "Ruppin Academic Center";
        }
        else if (email.Contains("harvard."))
        {
            instName = "Harvard University";
        }


        Institute institute = new Institute().GetInstituteByName(instName);

        if (institute == null && instName.Length > 2)
        {
            institute = new Institute(-1, instName);
            institute.InsertInstituteToDatabase();
            institute = institute.GetInstituteByName(institute.Name);
        }
        return(institute);
    }
    //institute demo
    private void InsertInstituteDemo()
    {
        Institute institute = new Institute(0, "Academy Of Life Wallak");
        int       effected  = institute.InsertInstituteToDatabase();

        Response.Write(effected);
    }