예제 #1
0
        public void fill_comp_address(string x)
        {
            con.Open();

            SqlCommand cmd = new SqlCommand("SELECT CompAddress FROM QW_CompAddress where compId =@a", con);

            cmd.Parameters.Add(new SqlParameter("@a", DropDownList1.SelectedItem.Value));

            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataTable      dt = new DataTable();

            da.Fill(dt);
            DropDownList17.DataSource     = dt;
            DropDownList17.DataTextField  = "CompAddress";
            DropDownList17.DataValueField = "CompAddress";
            DropDownList17.DataBind();

            con.Close();
        }
 public void BindCR(DataTable dtali)
 {
     if (dtali.Rows.Count > 0)
     {
         DropDownList17.DataSource     = dtali;
         DropDownList17.DataTextField  = "CostReasonableness";
         DropDownList17.DataValueField = "Value";
         DropDownList17.DataBind();
         DropDownList17.Items.Insert(0, new ListItem("<< Select >>", "0"));
     }
     else
     {
         DropDownList17.DataSource     = null;
         DropDownList17.DataTextField  = "CostReasonableness";
         DropDownList17.DataValueField = "Value";
         DropDownList17.DataBind();
         DropDownList17.Items.Insert(0, new ListItem("<< Select >>", "0"));
         DropDownList17.SelectedIndex = 0;
     }
 }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    advisor_Id = 100, id = 100;
        string date = "4/16/2013";
        string stID = "822459053";

        lblAdvisorID.Text = advisor_Id.ToString();
        lblDate.Text      = date;
        lblStudentID.Text = stID;
        int time = 9;


        this.Util(100);
        DropDownList1.DataSource = getAdvisorIDs();
        DropDownList1.DataBind();

        Label2.Text = getAdvisorImage(advisor_Id);
        Label3.Text = getName(advisor_Id);
        Label4.Text = getDepartment(advisor_Id);
        //   Label5.Text = getMonday(advisor_Id);
        // ////Label6.Text = getTuesday(advisor_Id);
        // ////Label7.Text = getWednesday(advisor_Id);
        // ////Label8.Text = getThursday(advisor_Id);
        // ////Label9.Text = getFriday(advisor_Id);
        DropDownList10.DataSource = getSlots(advisor_Id, date);
        DropDownList10.DataBind();
        DropDownList11.DataSource = getTaken(advisor_Id, date);
        DropDownList11.DataBind();
        DropDownList12.DataSource = getAvailability(getSlots(advisor_Id, date), getTaken(advisor_Id, date));
        DropDownList12.DataBind();
        DropDownList13.DataSource = getDaysAvailable(id);
        DropDownList13.DataBind();
        // //Label14.Text = getAvailableID(time);
        Label15.Text = getCheck(stID).ToString();
        DropDownList16.DataSource = getAdvisor2WeekSchedule();
        DropDownList16.DataBind();
        DropDownList17.DataSource = getAdvisor2WeekSchedule(id);
        DropDownList17.DataBind();
        DropDownList18.DataSource = getStudentIds();
        DropDownList18.DataBind();
    }