Exemplo n.º 1
0
    private void ListBoxKins()
    {
        DataService data = new DataService();

        OleDbDataReader datareader = data.getallsubject();

        this.listSubjects.DataSource = datareader;
        this.listSubjects.DataTextField = "NameKind";
        this.listSubjects.DataBind();

        datareader.Close();
    }
Exemplo n.º 2
0
    protected void GridView_Click(object sender, EventArgs e)
    {
        DataService data = new DataService();
        OleDbDataReader dr = data.getallsubject();

        try
        {
            this.ihs.DataSource = dr;
            this.ihs.DataBind();
        }
        finally
        {
            dr.Close();
        }

    }
Exemplo n.º 3
0
 public string Getallcat()//חזיר קטגוריות לstring
 {
     DataService dataservice = new DataService();
     OleDbDataReader datareader = dataservice.getallsubject();
     string output = null;
     try
     {
         while (datareader.Read())
         {
             output += datareader["NameKind"].ToString() + "\n";
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return output;
 }