Ejemplo n.º 1
0
    protected void Save_Click(object sender, EventArgs e)
    {
        string RouteID = Request["RouteID"].ToString();
        //保存平曲线
        FlatCurver fc = new FlatCurver();
        fc.Save(0, Convert.ToInt32(RouteID), Convert.ToInt32(FlatCurve.SelectedValue),0,0,0,0,0,F_DE.Text);
        //保存竖曲线
        VerticalCurv vc = new VerticalCurv();
        vc.Save(0, Convert.ToInt32(RouteID), Convert.ToInt32(VerticalCurve.SelectedValue),0,0,0,0,0,V_DE.Text);

        Response.Redirect("DesignDataEnter.aspx", true);
    }
Ejemplo n.º 2
0
 /// <summary>
 /// 加载竖曲线
 /// </summary>
 /// <param name="RouteID"></param>
 /// <returns></returns>
 public List<VerticalCurv> Load(int VerticalCurveID)
 {
     if (DbConnection == null) return null;
     List<VerticalCurv> list = new List<VerticalCurv>();
     string sql = @"select * from RDC_VerticalCurve where VerticalCurveID='" + VerticalCurveID + "'";
      DataSet ds=DbConnection.GetDataSet(sql);
     foreach (DataRow v in ds.Tables[0].Rows)
     {
         VerticalCurv vc = new VerticalCurv();
         vc.VerticalCurveID = (int)v["VerticalCurveID"];
         vc.RouteID = v["RouteID"] == DBNull.Value ? 0 : Convert.ToInt32(v["RouteID"]);
         vc.VerticalCurveType = v["VerticalCurveType"] == DBNull.Value ? 0 : Convert.ToInt32(v["VerticalCurveType"]);
         vc.GradeChangePointNumber = v["GradeChangePointNumber"] == DBNull.Value ? 0 : Convert.ToInt32(v["RouteID"]);
         vc.CurveNumber = v["CurveNumber"] == DBNull.Value ? 0 : Convert.ToInt32(v["CurveNumber"]);
         vc.VerticalCurveLength = v["VerticalCurveLength"] == DBNull.Value ? 0 : Convert.ToDouble(v["VerticalCurveLength"]);
         vc.BeginStake = v["BeginStake"].ToString();
         vc.EndStake = v["EndStake"].ToString();
         vc.Description = v["Description"].ToString();
         list.Add(vc);
     }
     return list;
 }