Пример #1
0
 /// <summary>
 /// Company加载数据
 /// </summary>
 public void CompanyBing()
 {
     DBClass dbclass = new DBClass();
     DataSet ds = null;
     string strSql = string.Empty;
     strSql = "select distinct Comp from ViewGISRoute";
     ds = dbclass.GetDs(strSql);
     //com_Company.DataSource = ds.Tables[0];
     //com_Company.DisplayMember = "Comp";
     //com_Company.ValueMember = "Comp";
     com_Company.Items.Insert(0,"");
     //com_Company.Items.Add("");
     if (ds != null && ds.Tables[0].Rows.Count > 0)
     {
         for (int i = 0; i <ds.Tables[0].Rows.Count; i++)
         {
             if (ds.Tables[0].Rows[i][0] != null)
             {
                 com_Company.Items.Insert(i, ds.Tables[0].Rows[i][0].ToString());
             }
         }
     }
 }
Пример #2
0
        private void buOk_Click(object sender, EventArgs e)
        {
            if (com_Company.Text == "" || com_Route.Text == "")
            {
                return;
            }
            DBClass dbclass = new DBClass();
            DataSet ds      = null;
            string  strSql  = string.Empty;

            strSql = "select * from ViewGISRoute where GISLatitude!=''";
            string strAnd = string.Empty;

            if (com_Company.Text != string.Empty)
            {
                strAnd = " and Comp='" + com_Company.Text + "'";
            }
            strSql += strAnd + " order by Seq";

            ds = dbclass.GetDs(strSql);
            DrawLine(ds, colors);

            // ShowInformation(ds);
        }
Пример #3
0
        /// <summary>
        /// Company加载数据
        /// </summary>
        public void CompanyBing()
        {
            DBClass dbclass = new DBClass();
            DataSet ds      = null;
            string  strSql  = string.Empty;

            strSql = "select distinct Comp from ViewGISRoute";
            ds     = dbclass.GetDs(strSql);
            //com_Company.DataSource = ds.Tables[0];
            //com_Company.DisplayMember = "Comp";
            //com_Company.ValueMember = "Comp";
            com_Company.Items.Insert(0, "");
            //com_Company.Items.Add("");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    if (ds.Tables[0].Rows[i][0] != null)
                    {
                        com_Company.Items.Insert(i, ds.Tables[0].Rows[i][0].ToString());
                    }
                }
            }
        }
Пример #4
0
 private void com_Company_SelectedIndexChanged(object sender, EventArgs e)
 {
     //com_Route.Items.Insert(0, "");
     DBClass dbclass = new DBClass();
     DataSet ds = null;
     string strSql = string.Empty;
     string strAnd = string.Empty;
     if (com_Company.Text != string.Empty)
     {
         strAnd = " and Comp='" + com_Company.Text + "'";
     }
     strSql = "select  distinct Route from ViewGISRoute where 1=1"+strAnd;
     ds = dbclass.GetDs(strSql);
     com_Route.DataSource = ds.Tables[0];
     com_Route.DisplayMember = "Route";
     com_Route.ValueMember = "Route";
 }
Пример #5
0
        private void buOk_Click(object sender, EventArgs e)
        {
            if (com_Company.Text == "" || com_Route.Text == "")
            {
                return;
            }
            DBClass dbclass = new DBClass();
            DataSet ds = null;
            string strSql = string.Empty;
            strSql = "select * from ViewGISRoute where GISLatitude!=''";
            string strAnd = string.Empty;
            if (com_Company.Text != string.Empty)
            {
                strAnd = " and Comp='"+com_Company.Text+"'";
            }
            strSql += strAnd + " order by Seq";

            ds = dbclass.GetDs(strSql);
             DrawLine(ds, colors);

            // ShowInformation(ds);
        }