/// <summary> /// Displayig Country list /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); if (!IsPostBack) { int timeout = HttpContext.Current.Session.Timeout * 1000 * 60; // (60 sec = 1 min) ClientScript.RegisterStartupScript(this.GetType(), "SessionAlert", "SessionExpireAlert(" + timeout + ");", true); LoadData(); // pnlLogin.Visible = false; DataSet ds = new DataSet(); ds = countries.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } SqlDataAdapter sda = new SqlDataAdapter("select * from Countryt_Master", con); DataSet d2s = new DataSet(); sda.Fill(d2s); ddcountry.DataTextField = "CountryName"; ddcountry.DataValueField = "CountryID"; ddcountry.DataSource = d2s; ddcountry.DataBind(); ddcountry.Items.Insert(0, "Select Country"); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["mail"] != null) { Email = Request.QueryString["mail"].ToString(); txtemail.Text = Email; txtemail.ReadOnly = true; GetEmployeeDetails(Email); } if (chkmarried.Checked) { trsname.Visible = true; trchname.Visible = true; trchgender.Visible = true; trchbdate.Visible = true; } else { trsname.Visible = false; trchname.Visible = false; trchgender.Visible = false; trchbdate.Visible = false; } if (!IsPostBack) { ds = countries.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtcountry_name"].ToString(); country.Items[i].Value = ds.Tables[0].Rows[i - 1]["intcountry_id"].ToString(); pcountry.Items.Add(""); pcountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtcountry_name"].ToString(); pcountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intcountry_id"].ToString(); ncountry.Items.Add(""); ncountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtcountry_name"].ToString(); ncountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intcountry_id"].ToString(); ccountry.Items.Add(""); ccountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtcountry_name"].ToString(); ccountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intcountry_id"].ToString(); bcountry.Items.Add(""); bcountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtcountry_name"].ToString(); bcountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intcountry_id"].ToString(); prcountry.Items.Add(""); prcountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtcountry_name"].ToString(); prcountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intcountry_id"].ToString(); } } } }
/// <summary> /// To perform action when page is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { string streg = string.Empty; string usid = string.Empty; //open database connection to connect to sql server sqlConnection.Open(); //Navigate and bind current job openings DataSet ds2 = obj.GetCurr_Openings(); if (ds2.Tables[0].Rows.Count > 0) { ddlcurop.DataSource = ds2.Tables[0]; ddlcurop.DataBind(); } //close database connection to disconnect to sql server sqlConnection.Close(); ds1 = countries.GetCounty(); if (ds1.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds1.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds1.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds1.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } usid = Request.QueryString["id"].ToString(); DataSet ds = new DataSet(); //code to execute without refreshing the page. if (!IsPostBack) { SqlDataAdapter imgtext = new SqlDataAdapter("Select * from vendorreg where userid=" + usid, sqlConnection); imgtext.Fill(ds, "vendorreg"); if (!ds.Tables[0].Rows.Count.Equals(0)) { txtusername.Text = ds.Tables[0].Rows[0]["username"].ToString(); txtcompname.Text = ds.Tables[0].Rows[0]["cname"].ToString(); txtcompmail.Text = ds.Tables[0].Rows[0]["cemail"].ToString(); indtype.Text = ds.Tables[0].Rows[0]["indtype"].ToString(); conperson.Text = ds.Tables[0].Rows[0]["cperson"].ToString(); cpersondesig.Text = ds.Tables[0].Rows[0]["cpdesig"].ToString(); txturl.Text = ds.Tables[0].Rows[0]["comp_url"].ToString(); txtdesc.Text = ds.Tables[0].Rows[0]["cdesc"].ToString(); praddr.Text = ds.Tables[0].Rows[0]["address"].ToString(); staddr.Text = ds.Tables[0].Rows[0]["street"].ToString(); country.SelectedItem.Text = ds.Tables[0].Rows[0]["country"].ToString(); state.SelectedItem.Text = ds.Tables[0].Rows[0]["state"].ToString(); city.Text = ds.Tables[0].Rows[0]["city"].ToString(); W1_phno.Text = ds.Tables[0].Rows[0]["w1_phone"].ToString(); txtfax.Text = ds.Tables[0].Rows[0]["fax"].ToString(); } } }
/// <summary> /// To perform action when page is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { //open database connection to connect to sql server sqlConnection.Open(); DataSet ds2 = obj.GetCurr_Openings(); if (ds2.Tables[0].Rows.Count > 0) { ddlcurop.DataSource = ds2.Tables[0]; ddlcurop.DataBind(); } //Close database conncetion to disconnect to sql server sqlConnection.Close(); ds1 = countries.GetCounty(); lblerror.Visible = false; if (ds1.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds1.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds1.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds1.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } string uid = string.Empty; DataSet ds = new DataSet(); uid = Request.QueryString["id"].ToString(); //create page withour refreshing the page if (!IsPostBack) { SqlDataAdapter imgtext = new SqlDataAdapter("Select * from client_register where ID=" + uid, sqlConnection); imgtext.Fill(ds, "client_register"); if (!ds.Tables[0].Rows.Count.Equals(0)) { txtusername.Text = ds.Tables[0].Rows[0]["uname"].ToString(); txtcompanyname.Text = ds.Tables[0].Rows[0]["companyname"].ToString(); txtcompanymailid.Text = ds.Tables[0].Rows[0]["companyemail"].ToString(); ddlindtype.SelectedItem.Value = ds.Tables[0].Rows[0]["industrytype"].ToString(); txtcontactperson.Text = ds.Tables[0].Rows[0]["contactperson"].ToString(); txtcontactpersondesg.Text = ds.Tables[0].Rows[0]["contactpersondesignation"].ToString(); txtulr.Text = ds.Tables[0].Rows[0]["url"].ToString(); txtdesc.Text = ds.Tables[0].Rows[0]["description"].ToString(); txtaddrforcommunication.Text = ds.Tables[0].Rows[0]["addressforcommunication"].ToString(); txtstreetaddr.Text = ds.Tables[0].Rows[0]["streetaddress"].ToString(); country.SelectedItem.Text = ds.Tables[0].Rows[0]["country"].ToString(); state.SelectedItem.Text = ds.Tables[0].Rows[0]["state"].ToString(); txtcity.Text = ds.Tables[0].Rows[0]["city"].ToString(); txtphone.Text = ds.Tables[0].Rows[0]["phone"].ToString(); txtfax.Text = ds.Tables[0].Rows[0]["fax"].ToString(); } } }
/// <summary> /// To perform action when page is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { emailid = Request.QueryString["email"].ToString(); string usid = string.Empty; //Initialise object to bind and navigate countries StateCountry countries = new StateCountry(); ds = countries.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); pcountry.Items.Add(""); pcountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); pcountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); ncountry.Items.Add(""); ncountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); ncountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); ccountry.Items.Add(""); ccountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); ccountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); bcountry.Items.Add(""); bcountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); bcountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } //bind the values of registered employee from admin connection.Open(); DataSet dsemp = new DataSet(); SqlDataAdapter daemp = new SqlDataAdapter("select * from employeereg1 where emailid='" + emailid + "'", connection); daemp.Fill(dsemp); if (!dsemp.Tables[0].Rows.Count.Equals(0)) { txtemail.Text = dsemp.Tables[0].Rows[0]["emailid"].ToString(); ctxtmail.Text = dsemp.Tables[0].Rows[0]["emailid"].ToString(); txtpwd.Text = dsemp.Tables[0].Rows[0]["pwd"].ToString(); fname.Text = dsemp.Tables[0].Rows[0]["firstname"].ToString(); lname.Text = dsemp.Tables[0].Rows[0]["lastname"].ToString(); lbldisg.Text = dsemp.Tables[0].Rows[0]["designation"].ToString(); } connection.Close(); }
/// <summary> /// To perform action when page is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { //Initialise object to bind and navigate countries StateCountry countries = new StateCountry(); ds = countries.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["userid"] == null) { Response.Redirect("Login.aspx"); } else { ds = new DataSet(); ds = countries.GetCounty(); ddlCountry.DataSource = ds; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, "Select Country"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { StateCountry coun = new StateCountry(); DataSet ds = new DataSet(); ds = coun.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { ddlcountry.Items.Add(""); ddlcountry.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); ddlcountry.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } } }
/// <summary> /// To perform action when page is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { lblerror.Visible = false; //Initilaise object to navigate and bind countries StateCountry countries = new StateCountry(); DataSet ds = new DataSet(); ds = countries.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } }
/// <summary> /// To perform action when page is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { //code to execute without refreshing the page. if (!IsPostBack) { //Initialise object to bind and navigate countries StateCountry coun = new StateCountry(); DataSet ds = new DataSet(); ds = coun.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } } }
/// <summary> /// country names loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); if (!IsPostBack) { int timeout = HttpContext.Current.Session.Timeout * 1000 * 18000; // (60 sec * 1 min)300 mins means 5 hours ClientScript.RegisterStartupScript(this.GetType(), "SessionAlert", "SessionExpireAlert(" + timeout + ");", true); ds = countries.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 1; i <= ds.Tables[0].Rows.Count; i++) { country.Items.Add(""); country.Items[i].Text = ds.Tables[0].Rows[i - 1]["txtCountry_name"].ToString(); country.Items[i].Value = ds.Tables[0].Rows[i - 1]["intCountry_id"].ToString(); } } } }
protected void Page_Load(object sender, EventArgs e) { ds = countries.GetCounty(); if (ds.Tables[0].Rows.Count > 0) { for (int ic = 1; ic <= ds.Tables[0].Rows.Count; ic++) { country.Items.Add(""); country.Items[ic].Text = ds.Tables[0].Rows[ic - 1]["txtCountry_name"].ToString(); country.Items[ic].Value = ds.Tables[0].Rows[ic - 1]["intCountry_id"].ToString(); pcountry.Items.Add(""); pcountry.Items[ic].Text = ds.Tables[0].Rows[ic - 1]["txtCountry_name"].ToString(); pcountry.Items[ic].Value = ds.Tables[0].Rows[ic - 1]["intCountry_id"].ToString(); ncountry.Items.Add(""); ncountry.Items[ic].Text = ds.Tables[0].Rows[ic - 1]["txtCountry_name"].ToString(); ncountry.Items[ic].Value = ds.Tables[0].Rows[ic - 1]["intCountry_id"].ToString(); ccountry.Items.Add(""); ccountry.Items[ic].Text = ds.Tables[0].Rows[ic - 1]["txtCountry_name"].ToString(); ccountry.Items[ic].Value = ds.Tables[0].Rows[ic - 1]["intCountry_id"].ToString(); bcountry.Items.Add(""); bcountry.Items[ic].Text = ds.Tables[0].Rows[ic - 1]["txtCountry_name"].ToString(); bcountry.Items[ic].Value = ds.Tables[0].Rows[ic - 1]["intCountry_id"].ToString(); } } //spouse birthdate DateTime tnow = DateTime.Now; ArrayList year = new ArrayList(); ArrayList yearex = new ArrayList(); int i; int xy = DateTime.Now.Year; for (i = 1947; i <= xy; i++) { year.Add(i); } year.Insert(0, "Select"); ArrayList day = new ArrayList(); for (i = 1; i <= 31; i++) { day.Add(i); } day.Insert(0, "Select"); if (!this.IsPostBack) { ddlday.DataSource = day; ddlday.DataBind(); ddlyear.DataSource = year; ddlyear.DataBind(); ddlday1.DataSource = day; ddlday1.DataBind(); ddlyear1.DataSource = year; ddlyear1.DataBind(); ddlday2.DataSource = day; ddlday2.DataBind(); ddlyear2.DataSource = year; ddlyear2.DataBind(); ddlday3.DataSource = day; ddlday3.DataBind(); ddlyear3.DataSource = year; ddlyear3.DataBind(); ddlday4.DataSource = day; ddlday4.DataBind(); ddlyear4.DataSource = year; ddlyear4.DataBind(); ddlday6.DataSource = day; ddlday6.DataBind(); ddlyear6.DataSource = year; ddlyear6.DataBind(); for (i = 1947; i <= 2100; i++) { yearex.Add(i); } yearex.Insert(0, "Select"); ddlexpday.DataSource = day; ddlexpday.DataBind(); ddlexpyear.DataSource = yearex; ddlexpyear.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["userid"] == null && Session["Designation"] == null) { Response.Redirect("login.aspx"); } else { if (Request.QueryString["sid"] != null) { uid = Request.QueryString["sid"].ToString(); if (uid != "") { SqlDataAdapter imgtext = new SqlDataAdapter("Select * from vendors where vid=" + uid, con); ds = new DataSet(); imgtext.Fill(ds); if (!ds.Tables[0].Rows.Count.Equals(0)) { txtname.Text = ds.Tables[0].Rows[0]["firm_name"].ToString(); txtmobile.Text = ds.Tables[0].Rows[0]["mobile"].ToString(); txtaddress1.Text = ds.Tables[0].Rows[0]["address"].ToString(); txthead.Text = ds.Tables[0].Rows[0]["headquarter"].ToString(); txtdatabusiness.Text = ds.Tables[0].Rows[0]["datebusinesstand"].ToString(); txtpre.Text = ds.Tables[0].Rows[0]["ppowner"].ToString(); txtotherofficers.Text = ds.Tables[0].Rows[0]["otheroffices"].ToString(); txttype.Text = ds.Tables[0].Rows[0]["type"].ToString(); txtpurchasevalue.Text = ds.Tables[0].Rows[0]["lcurrentpurchase"].ToString(); txtrefrences.Text = ds.Tables[0].Rows[0]["ltradereferences"].ToString(); txtlistofbank.Text = ds.Tables[0].Rows[0]["lbankreferences"].ToString(); txtcompleteby.Text = ds.Tables[0].Rows[0]["compby"].ToString(); txtcomby.Text = ds.Tables[0].Rows[0]["compdate"].ToString(); txtapporvedby.Text = ds.Tables[0].Rows[0]["apboy"].ToString(); txtapby.Text = ds.Tables[0].Rows[0]["apbdate"].ToString(); txtname.Enabled = false; txtmobile.Enabled = false; txtaddress1.Enabled = false; txthead.Enabled = false; txtdatabusiness.Enabled = false; txtpre.Enabled = false; txtotherofficers.Enabled = false; txttype.Enabled = false; txtpurchasevalue.Enabled = false; txtrefrences.Enabled = false; txtlistofbank.Enabled = false; txtcompleteby.Enabled = false; txtcomby.Enabled = false; txtapporvedby.Enabled = false; txtapby.Enabled = false; string stest = ds.Tables[0].Rows[0]["check"].ToString(); if (stest == "Corporation" || stest == "Partnership" || stest == "Individual") { CheckBoxList1.SelectedValue = ds.Tables[0].Rows[0]["check"].ToString(); } else { CheckBoxList1.SelectedValue = "Other"; txtother.Text = ds.Tables[0].Rows[0]["check"].ToString(); } int s = Convert.ToInt32(ds.Tables[0].Rows[0]["rcheck"]); txtCName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtTitle.Text = ds.Tables[0].Rows[0]["title"].ToString(); txtMail.Text = ds.Tables[0].Rows[0]["VenMail"].ToString(); txtUrl.Text = ds.Tables[0].Rows[0]["website"].ToString(); txtTax.Text = ds.Tables[0].Rows[0]["taxid"].ToString(); txtWork.Text = ds.Tables[0].Rows[0]["work"].ToString(); txtDirect.Text = ds.Tables[0].Rows[0]["direct"].ToString(); txtFax.Text = ds.Tables[0].Rows[0]["fax"].ToString(); txtCName.Enabled = false; txtTitle.Enabled = false; txtMail.Enabled = false; txtUrl.Enabled = false; txtTax.Enabled = false; txtWork.Enabled = false; txtDirect.Enabled = false; txtFax.Enabled = false; txtstart.Enabled = false; txthour.Enabled = false; txtot.Enabled = false; txtnet.Enabled = false; txtuser.Enabled = false; if ((ds.Tables[0].Rows[0]["country"].ToString() == "") || (ds.Tables[0].Rows[0]["country"].ToString() == "Select Country")) { ddlCountry.SelectedIndex = -1; } else { ddlCountry.SelectedItem.Text = ds.Tables[0].Rows[0]["country"].ToString(); bindstates(ddlCountry.SelectedItem.Text); ddlstate.SelectedItem.Text = ds.Tables[0].Rows[0]["state"].ToString(); if (ddlstate.SelectedItem.Text != "Select State") { bindCity(ddlstate.SelectedItem.Text); try { ddlcity.SelectedItem.Text = ds.Tables[0].Rows[0]["city"].ToString(); txtcity.Visible = false; } catch { txtcity.Visible = true; ddlcity.SelectedItem.Text = "Other City"; txtcity.Text = ds.Tables[0].Rows[0]["city"].ToString(); } } else { ddlcity.SelectedItem.Text = "Select City"; } } txtZip.Text = ds.Tables[0].Rows[0]["zip"].ToString(); txtaddress2.Text = ds.Tables[0].Rows[0]["Addressline2"].ToString(); if (s == 1) { rbtnyes.Checked = true; } else { rbtnno.Checked = true; } btnsubmit.Visible = false; } } } ds = new DataSet(); ds = countries.GetCounty(); ddlCountry.DataSource = ds; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, "Select Country"); SqlDataAdapter da = new SqlDataAdapter("select * from EmpContacts order by emp_id asc", con); DataSet ds1 = new DataSet(); da.Fill(ds1); ddemp.DataSource = ds1; ddemp.DataTextField = "cname"; ddemp.DataValueField = "cid"; ddemp.DataBind(); ddemp.Items.Insert(0, "Select Employee"); //SqlDataAdapter da1 = new SqlDataAdapter("select * from EmpContacts order by emp_id asc", con); //DataSet ds11 = new DataSet(); //da1.Fill(ds11); //if (ds11.Tables[0].Rows.Count > 0) //{ //} string date1 = DateTime.UtcNow.ToString(); DateTime d = new DateTime(); d = DateTime.UtcNow.AddHours(-4); txtcomby.Text = Convert.ToString(d); txtapby.Text = Convert.ToString(d); emailid = Session["userid"].ToString(); SqlDataAdapter sdaaaaa = new SqlDataAdapter("select * from employeereg1 where emailid='" + emailid + "' order by userid asc", con); DataSet dssss = new DataSet(); sdaaaaa.Fill(dssss); if (dssss.Tables[0].Rows.Count > 0) { txtcompleteby.Text = dssss.Tables[0].Rows[0]["firstname"].ToString(); txtuser.Text = dssss.Tables[0].Rows[0]["emailid"].ToString(); // txtapby.Text = Session["UserName"].ToString(); } } } }