Ejemplo n.º 1
0
        protected void Repnearbymetro_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Footer)
            {
                MasterData mdl = new MasterData();
                DataTable dt = new DataTable();
                CommonFunction.CommonFun objcf = new CommonFunction.CommonFun();
                DropDownList ddlcitynearby = e.Item.FindControl("ddlcitynearby") as DropDownList;

                dt = mdl.GetCityStates();
                objcf.FillDropDownList(ddlcitynearby, dt, "City_Name", "City_id");
                dt = mdl.Getstate();
                DropDownList ddlstatenc = e.Item.FindControl("ddlstatenc") as DropDownList;
                objcf.FillDropDownList(ddlstatenc, dt, "state_name", "state_id");
                MasterData objmst = new MasterData();
                dt = new DataTable();
                dt = objmst.Getcountry();
                DropDownList ddlcountrync = e.Item.FindControl("ddlcountrync") as DropDownList;
                objcf.FillDropDownList(ddlcountrync, dt, "Country_Name", "Country_ID");
            }
        }
Ejemplo n.º 2
0
 protected void fillstate()
 {
     MasterData mdl = new MasterData();
     DataTable dt = new DataTable();
     dt = mdl.Getstate();
     CommonFunction.CommonFun objcf = new CommonFunction.CommonFun();
     objcf.FillDropDownList(ddlstate, dt, "state_name", "state_id");
     //DropDownList ddlstatenc = Repnearbymetro.Controls[Repnearbymetro.Controls.Count - 1].FindControl("ddlstatenc") as DropDownList;
     //objcf.FillDropDownList(ddlstatenc, dt, "state_name", "state_id");
 }
 //protected void ddltitle_SelectedIndexChanged(object sender, EventArgs e)
 //{
 //    DropDownList ddlfirstname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddlfirstname");
 //    DropDownList ddltitle = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddltitle");
 //    Label lblfax = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblfax");
 //    Label lblemail = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblemail");
 //    Label lblphone = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblphone");
 //    TextBox txtfirstname = (TextBox)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("txtfirstname");
 //    DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname");
 //    AjaxControlToolkit.AutoCompleteExtender acefirstname = (AjaxControlToolkit.AutoCompleteExtender)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("acefirstname");
 //    acefirstname.ContextKey = ddltitle.SelectedValue;
 //    txtfirstname.Text = string.Empty;
 //    ListItem li = ddllastname.Items[0];
 //    ddllastname.Items.Clear();
 //    ddllastname.Items.Add(li);
 //    lblfax.Text = string.Empty;
 //    lblemail.Text = string.Empty;
 //    lblphone.Text = string.Empty;
 //    loadPersonalFirstName();
 //}
 protected void txtfirstname_TextChanged(object sender, EventArgs e)
 {
     DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname");
     TextBox txtfirstname = (TextBox)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("txtfirstname");
     ddllastname.Focus();
     PresenterData objpres = new PresenterData();
     DataTable dt = objpres.GetPersonalName(txtfirstname.Text, "", "L", "Y");
     CommonFun objcf = new CommonFun();
     objcf.FillDropDownList(ddllastname, dt, "PERSONAL_FNAME", "PERSONAL_ID");
     if (dt.Rows.Count == 1)
     {
         ddllastname.SelectedIndex = 1;
         hdnfirstnameid.Value = ddllastname.SelectedItem.Value;
         loadphonedetails();
         setneweditlink();
     }
     setneweditlink();
 }
Ejemplo n.º 4
0
 public void fillcountry()
 {
     MasterData objmst = new MasterData();
     DataTable dt = objmst.Getcountry();
     CommonFun objcf = new CommonFun();
     objcf.FillDropDownList(ddlcountry, dt, "Country_Name", "Country_ID");
     //DropDownList ddlcountrync = Repnearbymetro.Controls[Repnearbymetro.Controls.Count - 1].FindControl("ddlcountrync") as DropDownList;
     //objcf.FillDropDownList(ddlcountrync, dt, "Country_Name", "Country_ID");
 }
        public void loadPersonalLastName()
        {
            DropDownList ddlfirstname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddlfirstname");
            DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname");
            PresenterData objpres = new PresenterData();
            DataTable dt = objpres.GetPersonalName(ddlfirstname.SelectedItem.Text, "", "L", "Y");

            CommonFun objcf = new CommonFun();
            objcf.FillDropDownList(ddllastname, dt, "PERSONAL_FNAME", "PERSONAL_ID");
            if (dt.Rows.Count == 1)
            {
                ddllastname.SelectedIndex = 1;
                hdnfirstnameid.Value = ddllastname.SelectedItem.Value;
            }
            loadphonedetails();
            ddllastname.Focus();
        }