Exemplo n.º 1
0
 public void architecture_get()
 {
     moyu.User.School mySchool=new moyu.User.School();
     Hashtable[] architectures = mySchool.architectureGet(Convert.ToInt32(Session["id"]));
     if (architectures.Count() == 0)
     {
         Response.Write("<option value=\"-1\">没有可以发送的构架</option>");
     }
     else
     {
         foreach (Hashtable architecture in architectures)
         {
             Response.Write("<option value=\"" + architecture["id"] + "\">" + architecture["name"] + "</option>");
         }
     }
 }
Exemplo n.º 2
0
 public void architecture_get()
 {
     moyu.User.School mySchool = new moyu.User.School();
     Hashtable[] architectures = mySchool.architectureGet(Convert.ToInt32(Session["id"]));
     int iIndex = 1;
     if (architectures.Count() == 0)
     {
         Response.Write("<li data-value=\"-1\">无</li>");
     }
     else
     {
         foreach (Hashtable architecture in architectures)
         {
             if (architecture["type"].ToString() == "2")
             {
                 if (classId == 0)
                 {
                     if (iIndex == 1)
                     {
                         Response.Write("<li class=\"selected schoolEcard-c-f-s-architecture\" data-value=\"" + architecture["id"] + "\">" + architecture["name"] + "</li>");
                         classId = Convert.ToInt32(architecture["id"]);
                     }
                     else
                     {
                         Response.Write("<li class=\"schoolEcard-c-f-s-architecture\" data-value=\"" + architecture["id"] + "\">" + architecture["name"] + "</li>");
                     }
                 }
                 else
                 {
                     if (Convert.ToInt32(architecture["id"]) == classId)
                     {
                         Response.Write("<li class=\"selected schoolEcard-c-f-s-architecture\" data-value=\"" + architecture["id"] + "\">" + architecture["name"] + "</li>");
                     }
                     else
                     {
                         Response.Write("<li class=\"schoolEcard-c-f-s-architecture\" data-value=\"" + architecture["id"] + "\">" + architecture["name"] + "</li>");
                     }
                 }
                 iIndex++;
             }
         }
     }
 }