protected void Page_Load(object sender, EventArgs e) { try { if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "") { Response.Redirect("../Login.aspx"); } else { //showimg(); } txtsessionyear.Text = DateTime.Now.Year.ToString(); if (!IsPostBack) { clState.xmlstate(ddlState, "XMLState.xml"); clState.xmlCity(ddlCity, ddlState.SelectedItem.Text, "XMLState.xml"); txtcounselor.Focus(); txtdate.Text = DateTime.Now.ToString("dd/MM/yyyy"); maikal mk = new maikal(); int lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString()); ClsFO clsfo = new ClsFO(); lblCID.Text = (clsfo.maxSN() + 1).ToString(); } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "") { Response.Redirect("../Login.aspx"); invisible.Visible = true; visisble.Visible = false; } if (Request.QueryString["id"].ToString() == "") { invisible.Visible = true; visisble.Visible = false; } else { visisble.Visible = true; invisible.Visible = false; lblEnrolment.Text = Request.QueryString["id"].ToString(); } if (!IsPostBack) { txtothercity.Visible = false; lblcity.Visible = false; statecity.xmlstate(ddlstate, "XMLState.xml"); statecity.xmlCity(ddlcity, ddlstate.SelectedItem.Text.ToString(), "XMLState.xml"); txtName.Focus(); } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Convert.ToString(MyLogin.login[0]) == "") { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { ddlType.SelectedValue = "All"; ddlStatus.SelectedValue = "Registered"; clsstatecity.xmlstate(ddlState, "XMLState.xml"); clsstatecity.xmlCity(ddlCity, ddlState.SelectedItem.Text.ToString(), "XMLState.xml"); txtIMID.Text = Request.QueryString["id"].ToString(); if (Request.QueryString["id"] == "") { panelProfile.Visible = false; panelInspection.Visible = false; panelChangeStatus.Visible = false; panelSubscribe.Visible = false; } else { panelProfile.Visible = true; showprofile(Request.QueryString["id"]); } maikal dev = new maikal(); int se = dev.chksession(); if (se == 0) { ddlsession.SelectedValue = "Sum"; ddlSessionFrom.SelectedValue = "Sum"; } else { ddlsession.SelectedValue = "Win"; ddlSessionFrom.SelectedValue = "Win"; } txtSession.Text = DateTime.Now.Year.ToString(); txtYearFrom.Text = DateTime.Now.Year.ToString(); lblSessionHiddend.Text = ddlsession.SelectedValue.ToString() + "" + txtSession.Text.ToString(); SqlDataAdapter ad = new SqlDataAdapter("select ID,Name,Address,State,Email,Type,RegDate,YearFrom from Member where Active='Registered' or Active='Register'", con); DataSet ds = new DataSet(); ad.Fill(ds); GridDuplicacy.DataSource = ds; GridDuplicacy.DataBind(); lblInspectionNo.Text = "0"; maikal devnagar = new maikal(); int lvl = devnagar.returnlevel(MyLogin.login[1].ToString(), MyLogin.login[0].ToString()); if (lvl == 2) { panelChangeStatus.Enabled = false; panelSubscribe.Enabled = false; } txtAddress.Focus(); } } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "") { Response.Redirect("../Login.aspx"); } else { } if (!IsPostBack) { C1.xmlstate(ddlState, "XMLState.xml"); C1.xmlCity(ddlCity, ddlState.SelectedItem.Text, "XMLState.xml"); dropsession.Focus(); string se = Request.QueryString["session"]; string fw = se.Substring(0, 1); if (fw == "W") { dropsession.SelectedIndex = 1; } else { dropsession.SelectedIndex = 0; } string lw = se.Substring(3, 4); txtsession.Text = lw.ToString(); lblSeason.Text = dropsession.SelectedItem.Value + txtsession.Text; ddlExamCenterName.DataBind(); if (ddlExamCenterName.Text != null || ddlExamCenterName.Text != "") { code(); } else { if (Request.QueryString["Id"] != "") { string str = "select Name from Examcenter where Season='" + lblSeason.Text + "' and Id='" + Request.QueryString["Id"] + "'"; cmd = new SqlCommand(str, con); con.Open(); str = Convert.ToString(cmd.ExecuteScalar()); con.Close(); ddlExamCenterName.Text = str; txtcenterCode.Text = Request.QueryString["id"].ToString(); } } lblsession.Text = dropsession.SelectedItem.Value + txtsession.Text; } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "") { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { clsState.xmlstate(ddlPState, "XMLState.xml"); clsState.xmlCity(ddlPCity, ddlPState.SelectedItem.Text, "XMLState.xml"); clsState.xmlstate(ddlCState, "XMLState.xml"); clsState.xmlCity(ddlCCity, ddlCState.SelectedItem.Text, "XMLState.xml"); con.Close(); con.Open(); btnUpdate.Visible = false; //txtDOB.Text = DateTime.Now.ToString("dd/mm/yyyy"); maikal dev = new maikal(); int se = dev.chksession(); if (se == 0) { ddlExamSeason.SelectedValue = "Sum"; } else { ddlExamSeason.SelectedValue = "Win"; } txtYearSeason.Text = DateTime.Now.Year.ToString(); SqlCommand cmd = new SqlCommand("select Max(SN) from PaperSetter", con); strsn = Convert.ToString(cmd.ExecuteScalar()); if (strsn.ToString() == "") { SqlCommand cmdin = new SqlCommand("insert into PaperSetter(Name) values('ICE')", con); cmdin.ExecuteNonQuery(); } txtID.Focus(); con.Close(); con.Dispose(); } } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }
protected void ddlState_SelectedIndexChanged(object sender, EventArgs e) { ClsStateCity obStateCity = new ClsStateCity(); obStateCity.xmlCity(ddlCity, ddlState.SelectedItem.Text.ToString(), "XMLState.xml"); ddlState.Focus(); }
protected void lbtnSupplier_Click(object sender, EventArgs e) { pnlSupplier.Visible = true; ClsStateCity obStateCity = new ClsStateCity(); obStateCity.xmlstate(ddlState, "XMLState.xml"); obStateCity.xmlCity(ddlCity, ddlState.SelectedItem.Text.ToString(), "XMLState.xml"); pnlSupplier.Focus(); }
protected void Page_Load(object sender, EventArgs e) { try { if (Convert.ToString(Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"])) == "") { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { lblOtherCity.Visible = false; txtNewCity.Visible = false; clstate.xmlstate(ddlState, "XMLState.xml"); clstate.xmlCity(ddlCity, ddlState.SelectedItem.Text.ToString(), "XMLState.xml"); maikal dev = new maikal(); maikal mk = new maikal(); int lvl = mk.returnlevel(Server.HtmlEncode(Request.Cookies["MyLogin"]["UID"]).ToString(), Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]).ToString()); int se = dev.chksession(); if (se == 0) { ddlExamSeason.SelectedValue = "Sum"; } else { ddlExamSeason.SelectedValue = "Win"; } txtDiaryDate.Text = Convert.ToString(DateTime.Now.ToString("dd/MM/yyyy")); txtYearSeason.Text = DateTime.Now.Year.ToString(); lblHiddenSeason.Text = ddlExamSeason.SelectedValue.ToString() + "" + txtYearSeason.Text.ToString(); tbltext.Visible = false; lblFromName.Text = "IM ID"; panelCourier.Visible = false; getrefno(); } ddlExamSeason.Focus(); } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]) == null) { Response.Redirect("../Login.aspx"); } else { } if (!IsPostBack) { state.xmlstate(ddlState, "XMLState.xml"); state.xmlCity(ddlcity, ddlState.SelectedItem.Text.ToString(), "XMLState.xml"); ddlState.Focus(); } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Server.HtmlEncode(Request.Cookies["MyLogin"]["PWD"]) == null) { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { txtothercity.Visible = false; lblcity.Visible = false; lblEnrolment.Text = Request.QueryString["id"].ToString(); statecity.xmlstate(ddlstate, "XMLState.xml"); statecity.xmlCity(ddlcity, ddlstate.SelectedItem.Text.ToString(), "XMLState.xml"); btnClear.Visible = false; if (Request.QueryString["id"].ToString() == "") { panelRight.Enabled = false; } ViewImg(); txtName.Focus(); } con.Close(); con.Open(); SqlCommand cmd = new SqlCommand("select * from IM where ID='" + Request.QueryString["id"].ToString() + "'", con); SqlDataReader reader; reader = cmd.ExecuteReader(); string himgname = "", hsignname = "", aimgname = "", asingname = ""; while (reader.Read()) { himgname = reader["HImgName"].ToString(); hsignname = reader["HSignName"].ToString(); aimgname = reader["AImgName"].ToString(); asingname = reader["ASignName"].ToString(); } reader.Close(); con.Close(); if (himgname == "") { lblImgTitle.Text = "Upload Profile Picture."; imgDefault.Visible = true; } else { if (hsignname == "") { imgDefault.Visible = true; } else { imgDefault.Visible = false; } } if (aimgname == "") { lblImgTitle.Text = "Change Profile Image"; Image2.Visible = true; } else { if (asingname == "") { Image2.Visible = true; } else { Image2.Visible = false; } } } } catch (NullReferenceException ex) { Response.Redirect("../Login.aspx"); } }