コード例 #1
0
    public string getSchedule(string id)//הבאת תגבורים
    {
        Tigburim        newTigbur  = new Tigburim();
        List <Tigburim> listTigbur = newTigbur.getTigburimList("studentDBConnectionString", "Lesson");

        listTigbur = newTigbur.checkIfSignedFunc(id, listTigbur);
        JavaScriptSerializer js = new JavaScriptSerializer();
        // serialize to string
        string jsonStringgetSchedule = js.Serialize(listTigbur);

        return(jsonStringgetSchedule);
    }
コード例 #2
0
    public string getTigburById(string id, string stuID, string IsCheckNeeded)
    {
        int      Check     = Convert.ToInt16(IsCheckNeeded);
        Tigburim newTigbur = (new Tigburim()).getTigburById(id);

        if (Check == 1)
        {
            List <Tigburim> tiglist = new List <Tigburim>();
            tiglist.Add(newTigbur);
            tiglist = newTigbur.checkIfSignedFunc(stuID, tiglist);
            foreach (Tigburim t in tiglist)
            {
                newTigbur = t;
            }
        }
        JavaScriptSerializer js = new JavaScriptSerializer();
        // serialize to string
        string jsonStringGetTurtering = js.Serialize(newTigbur);

        return(jsonStringGetTurtering);
    }