示例#1
0
 protected void ddlemp_change(object sender, EventArgs e)
 {
     if (ddlemp.SelectedIndex > 0)
     {
         DataSet ds = Utilities_Licensing.Getweeks(ddlemp.SelectedValue);
         if (ds.Tables[0].Rows.Count > 0)
         {
             hfdsdt.Value           = ds.Tables[0].Rows[0][0].ToString();
             hfdedt.Value           = ds.Tables[0].Rows[0][1].ToString();
             ddlweek.DataSource     = ds.Tables[1];
             ddlweek.DataTextField  = "ww";
             ddlweek.DataValueField = "ww";
             ddlweek.DataBind();
             ddlweek.Items.Insert(0, new ListItem("--Select--", "-1"));
         }
     }
     else
     {
         ddlweek.Items.Clear();
         hfdsdt.Value = "";
         hfdedt.Value = "";
     }
 }