新人求教,下面代码各什么意思

private void timeQuery(int id)
{
string scn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=数据表.mdb";
OleDbConnection mycn = new OleDbConnection(scn);

        mycn.Open();
        OleDbCommand mycmd = new OleDbCommand();
        mycmd.Connection = mycn;
        mycmd.CommandType = CommandType.Text;
        string t1 = this.dateTimePicker1.Value.ToString();
        string t = this.dateTimePicker2.Value.ToString();
        string c = "select * from point1 where id='" + id + "' and  time between # " + t1 + "# and # " + t + "# ";

        mycmd.CommandText = c;
        OleDbDataAdapter add = new OleDbDataAdapter(mycmd);
        DataSet ds = new DataSet();
        add.Fill(ds, "a");
        DataTable dt = new DataTable();
        dt = ds.Tables["a"];
        string name;
        IPointCollection ppc = new PolylineClass();
        for (int i = 0; i < dt.Rows.Count; i++)
        {

            name = dt.Rows[i]["id"].ToString();
            name = name.Trim();
            double x = Convert.ToDouble(dt.Rows[i]["x"]);
            double y = Convert.ToDouble(dt.Rows[i]["y"]);
            ITextElement pte = new TextElementClass();
            ISimpleTextSymbol psts = new TextSymbolClass();

            IFont mf = new StdFontClass();
            mf.Name = "宋体";//Courier New
            IFontDisp mt = mf as IFontDisp;
            psts.Font = mt;
            psts.Size = 18;

            pte.Symbol = psts;
            pte.Text = name;
            IElement pelt = pte as IElement;

            IElementProperties pelet = pelt as IElementProperties;
            pelet.Name = name;
            IElement pel = new MarkerElementClass();
            IPoint pp = new PointClass();

            pp.PutCoords(x, y);
            ppc.AddPoints(1, ref pp);
            pel.Geometry = pp;
            pelt.Geometry = pp;
            IElementProperties pele = pel as IElementProperties;
            pele.Name = name;

            ISimpleMarkerSymbol psm = new SimpleMarkerSymbolClass();
            IRgbColor prg = new RgbColorClass();
            IMarkerElement pme = pel as IMarkerElement;
            //psm.Style = esriSimpleMarkerStyle.esriSMSDiamond;
           IRgbColor prgb = new RgbColorClass();



            pgc.AddElement(pel, 0);

            pgc.AddElement(pelt, 0);

            this.axMapControl1.ActiveView.Refresh();

        }

        IPolyline ppl = ppc as IPolyline;
        IElement pele1 = new LineElementClass();
        pele1.Geometry = ppl;

        ILineElement ple = pele1 as ILineElement;
        ISimpleLineSymbol psl = new SimpleLineSymbolClass();
        //psl.Style = esriSimpleLineStyle.esriSLSSolid;   // ctrl + J
        IRgbColor prg1 = new RgbColorClass();


        pgc.AddElement(pele1, 0);
        this.axMapControl1.ActiveView.Refresh();

    }

string c = "select * from point1 where id='" + id + "' and time between # " + t1 + "# and # " + t + "# ";
查询id和你输入id相符,并且日期在你两个选择控件日期之间的point

for (int i = 0; i < dt.Rows.Count; i++)
循环遍历查询出来的点,根据id,x y坐标添加到你的地图上。