示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Panel1.Visible = false;
         Panel2.Visible = false;
         for (int i = 2017; i < 2050; i++)
         {
             DropDownList2.Items.Add(i.ToString());
         }
         submodelid = (string)Session["submodel_id"];
         colorid    = (string)Session["colorid"];
         dml       ob = new dml();
         DataTable dt = new DataTable();
         dt = ob.get_detials(submodelid, colorid);
         if (dt.Rows.Count > 0)
         {
             Label2.Text = dt.Rows[0]["MODEL_NAME"].ToString();
             Label3.Text = dt.Rows[0]["SUBMODEL_NAME"].ToString();
             Label4.Text = dt.Rows[0]["TYPE_NAME"].ToString();
             Label5.Text = dt.Rows[0]["COLOR_NAME"].ToString();
             Label6.Text = dt.Rows[0]["PRICE"].ToString();
             double d = Double.Parse(dt.Rows[0]["EXPECTED_DAYS"].ToString());
             Label7.Text = Convert.ToString(Session["Adv"]);
             DateTime expdate = System.DateTime.Today.AddDays(d);
             Label1.Text = expdate.ToString("dd/MM/yyyy");
         }
         RadioButtonList1.DataSource     = ob.getPaymentDetails();
         RadioButtonList1.DataTextField  = "METHOD_NAME";
         RadioButtonList1.DataValueField = "METHOD_ID";
         RadioButtonList1.DataBind();
     }
 }