コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            {
                if (!IsPostBack)
                {
                    BindData();
                }
            }

            if (PreviousPage != null)
            {
                TextBox SourceTextBox =
                    (TextBox)PreviousPage.FindControl("LastName");
                if (SourceTextBox != null)
                {
                    label1.Text = SourceTextBox.Text;
                }
            }
            if (PreviousPage != null)
            {
                TextBox SourceTextBox =
                    (TextBox)PreviousPage.FindControl("FirstMidName");
                if (SourceTextBox != null)
                {
                    label1.Text = SourceTextBox.Text;
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// When the page is loaded, unobtrusive validation is turned off.
 /// If the page is being loaded for the first time, it imports the information from the jersey options page and stores it in a session variable.
 /// In addition, it displays the jersey configuration to the user.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
     if (!IsPostBack)
     {
         //breates a variable indicating that the customer is new.
         Session["IsExistingCustomer"] = false;
         DropDownList ddlTeamName = (DropDownList)PreviousPage.FindControl("ddlTeamNames");
         Session["SelectedTeamID"] = ddlTeamName.SelectedItem.Value;
         DropDownList ddlJerseyColor = (DropDownList)PreviousPage.FindControl("ddlColor");
         Session["SelectedColorID"] = ddlJerseyColor.SelectedItem.Value;
         DropDownList ddlJerseySize = (DropDownList)PreviousPage.FindControl("ddlSize");
         Session["SelectedSizeID"] = ddlJerseySize.SelectedItem.Value;
         Label        lblJerseyPrice  = (Label)PreviousPage.FindControl("lblPrice");
         DropDownList ddlJerseyNumber = (DropDownList)PreviousPage.FindControl("ddlNumber");
         Session["SelectedJerseyNumber"] = ddlJerseyNumber.SelectedItem.Value;
         TextBox txtJerseyName = (TextBox)PreviousPage.FindControl("txtJerseyName");
         lblTeamName.Text     = ddlTeamName.SelectedItem.Text;
         lblJerseyNumber.Text = ddlJerseyNumber.Text;
         lblJerseyName.Text   = txtJerseyName.Text;
         lblJerseySize.Text   = ddlJerseySize.SelectedItem.Text;
         lblPrice.Text        = lblJerseyPrice.Text;
         lblJerseyColor.Text  = ddlJerseyColor.SelectedItem.Text;
     }
 }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null)
            {
                TextBox txt = (TextBox)PreviousPage.FindControl("txt");
                Label1.Text = txt.Text;
            }

            RadioButton r1 = (RadioButton)PreviousPage.FindControl("r1");
            RadioButton r2 = (RadioButton)PreviousPage.FindControl("r2");
            RadioButton r3 = (RadioButton)PreviousPage.FindControl("r3");

            if (r1.Checked == true || r2.Checked == true || r3.Checked == true)
            {
                if (r1.Checked == true)
                {
                    Label2.Text = " Quelconque ";
                }
                else if (r2.Checked == true)
                {
                    Label2.Text = " Moyenne ";
                }

                else
                {
                    Label2.Text = " Excellente ";
                }
            }
        }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Nombre"] != null)
     {
     }
     else
     {
         Response.Redirect("FrmLoginEn.aspx");
     }
     if (Page.PreviousPage != null)
     {
         if (!Label2.Visible)
         {
             string id = PreviousPage.getID();
             Label2.Text    = id;
             Label1.Visible = true;
             Label2.Visible = true;
             Proveedor p = dao.Buscar(Convert.ToInt32(id));
             txtNombre.Text    = p.Nombre_proveedor;
             txtTelefono.Text  = p.Telefono_proveedor;
             txtEmail.Text     = p.Email_proveedor;
             txtDireccion.Text = p.Direccion_proveedor;
             txtCiudad.Text    = p.Ciudad_proveedor;
             Button1.Text      = "Actualizar";
         }
     }
 }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null)
            {
                if (PreviousPage.IsCrossPagePostBack)
                {
                    var title  = PreviousPage.FindControl("TextBox1") as TextBox;
                    var member = PreviousPage.FindControl("ListBox1") as ListBox;
                    var time   = PreviousPage.FindControl("Calendar1") as Calendar;

                    if (title != null && member != null && time != null)
                    {
                        Label1.Text = title.Text;
                        Label2.Text = "";

                        foreach (ListItem memberItem in member.Items)
                        {
                            if (memberItem.Selected)
                            {
                                Label2.Text += memberItem.Text + ",";
                            }
                        }

                        Label3.Text = time.SelectedDate.ToLongDateString();
                    }
                }
            }
        }
コード例 #6
0
ファイル: Destination.aspx.cs プロジェクト: iorilan/CSharp
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
            {
                var txt = PreviousPage.FindControl("txtName") as TextBox;
                if (null != txt)
                {
                    lblName.Text = txt.Text;
                }
                return;
            }



            if (IsPostBack)
            {
                return;
            }


            if (PreviousPage == null)
            {
                return;
            }
            var txtName = PreviousPage.FindControl("txtName") as TextBox;

            if (null != txtName)
            {
                lblName.Text = txtName.Text;
            }
            lblId.Text = PreviousPage.Request.QueryString["SN"];
        }
コード例 #7
0
     protected void Page_Load(object sender, EventArgs e)
     {
 		if (!IsPostBack)
 		{
 			string numNights = Convert.ToString((TextBox)PreviousPage.FindControl("txtNights").Text);
             string arrivalDate = Convert.ToString((TextBox)PreviousPage.FindControl("txtArrivalDate").Text);
             string numAdults = Convert.ToString((DropDownList)PreviousPage.FindControl("ddlAdults").SelectedValue);
             string numChildren = Convert.ToString((DropDownList)PreviousPage.FindControl("ddlChildren").SelectedValue);
 			string roomTypeBusiness = "false";
             string roomTypeSuite = "false";
             string roomTypeStandard = "false";
             string bedTypeKing = "false";
             string bedTypeDouble = "false";
             string smokingOption = "false";
 
             if (Convert.ToBoolean((RadioButton)PreviousPage.FindControl("rdoBusiness).Checked"))
                 roomTypeBusiness = "true";
             else if (Convert.ToBoolean((RadioButton)PreviousPage.FindControl("rdoSuite").Checked"))
                 roomTypeSuite = "true";
             else
                 roomTypeStandard = "true";
 
             if (Convert.ToBoolean((RadioButton)PreviousPage.FindControl("rdoKing").Checked))
                 bedTypeKing = "true";
             else
                 bedTypeDouble = "true";
 
             string specialRequests = Convert.ToString((TextBox)PreviousPage.FindControl("txtSpecialRequests").Text);
             string name = Convert.ToString((TextBox)PreviousPage.FindControl("txtName").Text);
             string email = Convert.ToString((TextBox)PreviousPage.FindControl("txtEmail").Text);
 
             lblResults.Text = String.Format("Arrival Date: {0} \r\n Number of Nights: {1} \n Number of Adults: \r {2} Number of Children: {3} Business Room: {4} Suite Room: {5} Standard Room: {6} King Bed: {7} Double Bed: {8} Smoking: {9} Special Requests: {10} Name: {11} E-mail: {12}",
             arrivalDate, numNights, numAdults, numChildren, roomTypeBusiness, roomTypeSuite, roomTypeStandard, bedTypeKing, bedTypeDouble, smokingOption, specialRequests, name, email);		
 		}
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Writes information into the text box
            //txtVerifiedInfo.Text = Request["txtFirstName"] +
            //Return then Last Name
            //    "\n" + Request["txtLastName"] +
            //Return then Pay Rate
            //     "\n" + Request["txtPayRate"] +
            //Return then Start Date
            //     "\n" + Request["txtStartDate"] +
            //Return then End Date
            //    "\n" + Request["txtEndDate"];
            //Declares the value for the string getting passed over
            string strVerifyInfo;

            //Setting the value for the declared string
            strVerifyInfo = PreviousPage.FindControl(txtFirstName);
            //txtVerifiedInfo.Text = Request["txtFirstName"];
            //    "\n" + Request["txtLastName"] +
            //    "\n" + Request["txtPayRate"] +
            //    "\n" + Request["txtStartDate"] +
            //    "\n" + Request["txtEndDate"];

            //Writes the information into the text box
            txtVerifiedInfo.Text = strVerifyInfo;
        }
コード例 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (PreviousPage != null)
     {
         TextBox xx = (TextBox)PreviousPage.FindControl("TextBox1");
         lbl01.Text += "Voici les commentaires récupérés : " + xx.Text;
     }
     if (PreviousPage != null)
     {
         RadioButton x = (RadioButton)PreviousPage.FindControl("RadioButton1");
         if (x.Checked == true)
         {
             lbl02.Text += "et vous avez classé l'image comme : " + x.Text;
         }
     }
     if (PreviousPage != null)
     {
         RadioButton x = (RadioButton)PreviousPage.FindControl("RadioButton2");
         if (x.Checked == true)
         {
             lbl02.Text += "et vous avez classé l'image comme : " + x.Text;
         }
     }
     if (PreviousPage != null)
     {
         RadioButton x = (RadioButton)PreviousPage.FindControl("RadioButton3");
         if (x.Checked == true)
         {
             lbl02.Text += "et vous avez classé l'image comme :" + x.Text;
         }
     }
 }
コード例 #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        TextBox tx1, tx2;

        tx1 = (TextBox)PreviousPage.FindControl("TextBox1");
        tx2 = (TextBox)PreviousPage.FindControl("TextBox2");

        DropDownList    eduactional = (DropDownList)PreviousPage.FindControl("DropDownList1");
        RadioButtonList gender      = (RadioButtonList)PreviousPage.FindControl("RadioButtonList1");
        CheckBoxList    interest    = (CheckBoxList)PreviousPage.FindControl("CheckBoxList1");
        DropDownList    profession  = (DropDownList)PreviousPage.FindControl("DropDownList2");

        Label1.Text = tx1.Text;
        Label2.Text = gender.SelectedItem.Text;
        Label3.Text = eduactional.SelectedItem.Text;
        Label4.Text = profession.SelectedItem.Text;
        foreach (ListItem i in interest.Items)
        {
            if (i.Selected)
            {
                Label5.Text += i.Text + " ";
            }
        }
        Label6.Text = tx2.Text;
    }
コード例 #11
0
ファイル: 4_2Welcome.aspx.cs プロジェクト: dongfangyan/C-
    protected void Page_Load(object sender, EventArgs e)
    {
        string username, pswd;

        //使用查询字符串传递页面间的数据
        // username = this.Request.Params["username"];
        // pswd = this.Request.Params["pswd"];
        // username =Server.UrlDecode ( this.Request.Params["username"]);
        // pswd =Server.UrlDecode ( this.Request.Params["pswd"]);

        // 使用会话状态传递页面间的数据
        //  username =this.Session["username"].ToString () ;
        //  pswd = this.Session["pswd"].ToString();

        // 使用跨页提交功能
        // 获取源页(登录页面)的控件值
        TextBox textbox1, textbox2;

        textbox1 = (TextBox)PreviousPage.FindControl("txtUsername");
        textbox2 = (TextBox)PreviousPage.FindControl("txtPassWord");
        username = textbox1.Text;
        pswd     = textbox2.Text;

        this.Response.Write(username + "您好!欢迎您访问本网站;您的密码为:" + pswd);
    }
コード例 #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //if (Session["Nombre"] != null)
     //{
     //}
     //else
     //{
     //    Response.Redirect("FrmLoginEn.aspx");
     //}
     if (Page.PreviousPage != null)
     {
         if (!Label2.Visible)
         {
             string     id = PreviousPage.getID();
             Mensajeria m  = dao.Buscar(Convert.ToInt32(id));
             txtNombre.Text   = m.Nombre_mensajeria;
             txtTelefono.Text = m.Telefono_mensajeria;
             txtEmail.Text    = m.Email_mensajeria;
             Label1.Visible   = true;
             Label2.Text      = id;
             Label2.Visible   = true;
             Button1.Text     = "Actualizar";
         }
     }
 }
コード例 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null)
            {
                TextBox txtSearch = (TextBox)PreviousPage.FindControl("TextBox4");
                lblSearch.Text = txtSearch.Text;
            }

            SqlConnection conn = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=" + Server.MapPath("~\\App_Data\\mydatabase.mdf") + ";Integrated Security=True");

            GridView1.DataSourceID = "";

            String     query = "select * from utilisateur where (nom like '%' + @search + '%')";
            SqlCommand sr    = new SqlCommand(query, conn);

            sr.Parameters.Add("@search", SqlDbType.NVarChar).Value = lblSearch.Text;

            conn.Open();
            sr.ExecuteNonQuery();
            SqlDataAdapter da = new SqlDataAdapter();

            da.SelectCommand = sr;
            DataSet ds = new DataSet();

            da.Fill(ds, "nom");
            GridView1.DataSource = ds;
            GridView1.DataBind();

            conn.Close();
        }
コード例 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        TextBox Cash = (TextBox)PreviousPage.FindControl("TextBox1");
        TextBox Rate = (TextBox)PreviousPage.FindControl("TextBox2");

        Label1.Text = Convert.ToString(Convert.ToDouble(Cash.Text) + Convert.ToDouble(Cash.Text) * Convert.ToDouble(Rate.Text));
    }
コード例 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str_Info = "PreviousPage: ";

            str_Info += PreviousPage != null ? "true" : "false";
            str_Info += "<br />";
            str_Info += "IsCrossPagePostBack: ";

            if (PreviousPage != null)
            {
                str_Info += PreviousPage.IsCrossPagePostBack ? "true" : "false";

                if (PreviousPage.IsCrossPagePostBack)
                {
                    TextBox tb = (TextBox)PreviousPage.FindControl("tb_1");
                    lab_2.Text = tb.Text;

                    Label lb = (Label)PreviousPage.FindControl("lab_1");
                    lab_3.Text = lb.Text;
                }
            }
            else
            {
                str_Info += "false";
            }

            lab_1.Text = str_Info;
        }
コード例 #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!PreviousPage.IsValid)
                {
                    labelResult.Text = "Error in previous page";
                    return;
                }
                //DropDownList dropDownListEvents = (DropDownList)PreviousPage.FindControl("dropDownListEvents");
                //string selectedEvent = dropDownListEvents.SelectedValue;
                labelResult.Text = "1";
                string firstName = ((TextBox)(PreviousPage.FindControl(
                                                  "textFirstName"))).Text;
                labelResult.Text = "2";
                string lastName = ((TextBox)(PreviousPage.FindControl(
                                                 "textLastName"))).Text;
                labelResult.Text = "3";
                string email = ((TextBox)(PreviousPage.FindControl(
                                              "textEmail"))).Text;
                labelResult.Text = "4";
                //labelResult.Text = String.Format("{0} {1} selected the event",firstName, lastName);
                //RegistrationInfo ri = PreviousPage.RegistrationInfo;

                /*LabelResult.Text = String.Format("{0} {1} selected the event {2}",
                 * ri.FirstName, ri.LastName, ri.SelectedEvent);*/
            }
            catch
            {
                labelResult.Text = "The originating page must contain " +
                                   "textFirstName, textLastName, textEmail controls";
            }
        }
コード例 #17
0
ファイル: Schema.aspx.cs プロジェクト: andersbolin/Vxlschema
    protected void Page_Load(object sender, EventArgs e)
    {
        string key;

        key = ((DropDownList)PreviousPage.FindControl("DropDownList1")).Text;

        string startdatum, slutdatum;

        startdatum = ((TextBox)PreviousPage.FindControl("DateTextBox")).Text;
        slutdatum  = ((TextBox)PreviousPage.FindControl("DateTextBox1")).Text;

        Label1.Text = startdatum;
        Label3.Text = slutdatum;
        Label2.Text = key;

        //Data Source=Data Source=(LocalDB)\v11.0;AttachDbFilename="C:\Users\Anders\Documents\Visual Studio 2013\WebSites\WebSite5\App_Data\SJ.mdf";Integrated Security=True;Connect Timeout=30
        SqlConnection conn;
        string        connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|/SJ.mdf;Integrated Security=True;Connect Timeout=30";

        conn = new SqlConnection(connectionString);

        try{
            conn.Open();
            Label3.Text = "Data connection is open..";
            conn.Close();
        } catch (Exception ex) {
            Label2.Text = "Failed to open..";
            Label3.Text = ex.ToString();
        }
    }
コード例 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
            {
                DropDownList depart      = PreviousPage.FindControl("DropDownList2") as DropDownList;
                DropDownList destination = PreviousPage.FindControl("DropDownList3") as DropDownList;
                Label        distance    = PreviousPage.FindControl("Label1") as Label;
                Label        duration    = PreviousPage.FindControl("Label3") as Label;
                TextBox      email       = PreviousPage.FindControl("TextBox2") as TextBox;
                txtEmail.Text = email.Text;
                Label member = PreviousPage.FindControl("lblEmail") as Label;

                TextBox      date  = PreviousPage.FindControl("TextBox1") as TextBox;
                DropDownList time1 = PreviousPage.FindControl("DropDownList4") as DropDownList;
                DropDownList time2 = PreviousPage.FindControl("DropDownList5") as DropDownList;
                DropDownList time3 = PreviousPage.FindControl("DropDownList6") as DropDownList;

                Label2.Text = depart.SelectedValue;
                Label3.Text = destination.SelectedValue;
                Label4.Text = date.Text;
                Label5.Text = time1.SelectedValue + ":" + time2.SelectedValue + " " + time3.SelectedValue;
                Label6.Text = distance.Text + " KM";

                Label9.Text  = time1.SelectedValue;
                Label10.Text = time2.SelectedValue;
                Label12.Text = time1.SelectedValue + "." + time2.SelectedValue;

                GridView1.Load += GridView1_Load;
            }
        }
コード例 #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Nombre"] != null)
        {
        }
        else
        {
            Response.Redirect("FrmLoginEn.aspx");
        }

        if (Page.PreviousPage != null)
        {
            if (!lblID.Visible)
            {
                string   id = PreviousPage.getID();
                Empleado em = JsonConvert.DeserializeObject <Empleado>(servicio.Buscar(Convert.ToInt32(id)));
                Label1.Visible     = true;
                lblID.Text         = Convert.ToString(em.Id);
                txtNombre.Value    = em.Nombre;
                txtApellido.Value  = em.Apellidos;
                txtUsuario.Value   = em.Usuario;
                txtPuesto.Value    = em.Puesto;
                txtCorreo.Value    = em.Email;
                txtDireccion.Value = em.Direccion;
                txtTelefono.Value  = em.Telefono;
                bntRegistrar.Text  = "Actualizar";
                lblID.Visible      = true;
            }
        }
    }
コード例 #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string ht  = Request.Form["ht"];
        string gt  = Request.Form["gt"];
        string que = Request.Form["que"];
        string mh  = Request.Form["mh"];

        //string ht = Request.QueryString["ht"];
        //string gt = Request.QueryString["gt"];
        //string que = Request.QueryString["que"];
        //string mh = Request.QueryString["mh"];

        Response.Write("<h2>Bạn vừa gửi đi thông tin:</h2>");
        Response.Write("Họ tên:" + ht + "<br />");
        Response.Write("Giới tính:" + gt + "<br />");
        Response.Write("Quê quán:" + que + "<br />");
        Response.Write("Môn học:" + mh + "<br />");
        //Nếu từ trang input2.aspx gửi sang thì
        CheckBoxList ck = (CheckBoxList)PreviousPage.FindControl("mh");
        string       s  = "";

        if (ck != null)
        {
            foreach (ListItem x in ck.Items)
            {
                if (x.Selected)
                {
                    s += x.Text + " ";
                }
            }
            Response.Write("Môn học:" + s + "<br />");
        }
    }
コード例 #21
0
    string GetInitiatingDepartment()
    {
        string initiatingDepartment = "";

        var initiatingDepartmentPrimary = PreviousPage.FindControl("ddlInitiatingDepartment") as DropDownList;
        var initiatingDepartmentSub     = PreviousPage.FindControl("ddlSubDepartments") as DropDownList;
        var initiatingDepartmentOther   = PreviousPage.FindControl("txtOtherInitiatingDepartment") as TextBox;

        string strInitiatingDepartmentPrimary = GetInitiatingDepartmentPrimary(Convert.ToInt16(initiatingDepartmentPrimary.Text));

        if (strInitiatingDepartmentPrimary == "Administration" || strInitiatingDepartmentPrimary == "MX" || strInitiatingDepartmentPrimary == "Operations")
        {
            initiatingDepartment = GetInitiatingDepartmentSub(Convert.ToInt16(initiatingDepartmentSub.Text));
        }
        else if (initiatingDepartmentPrimary.Text == "Other")
        {
            initiatingDepartment = initiatingDepartmentOther.Text;
        }
        else
        {
            initiatingDepartment = strInitiatingDepartmentPrimary;
        }

        return(initiatingDepartment);
    }
コード例 #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            try
            {
                CommonClass cm = new CommonClass();
                lblMessage.Text = " YOU HAVE SUCESSFULLY SUBMITTED YOUR INFORMATION.<br/> <br><br> 'Within 24-48 hours time you will receive an email directly from me, titled Your Free Reading from ZRox'which will contain your complete Free Astrological Reading.: ";

                TextBox     txmail = (TextBox)PreviousPage.FindControl("txtEmail");
                CommonClass mail   = new CommonClass();


                if (txmail != null && txmail.Text != "")
                {
                    string to  = txmail.Text.ToString();
                    string msg = "Welcome";
                    mail.SendMail("*****@*****.**", to, "Welcome in ZROX", msg);
                }
            }
            catch (Exception ex)
            {
                //Response.Redirect("Astrology_Confomation.aspx");
            }
        }
    }
コード例 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.PreviousPage != null && Page.PreviousPage.IsValid)
            {
                // Get the value of UserName and Token from the page that posted to this page.
                string userName = ((TextBox)PreviousPage.FindControl("_tbUserName")).Text;
                // If user name was specified, use it as the user token.
                if (!string.IsNullOrEmpty(userName))
                {
                    _hiddenFieldClientMetadata.Value = userName;
                }
            }

            if (!IsPostBack)
            {
                // Enumerate the source files and conversion profiles on the server path
                EnumerateURLSourceFiles();
                EnumerateProfiles();

                Session["tblSelected"] = null;

                // Initially sort the jobs list by their added Date/Time
                ViewState["SortExpression"] = "Added Data/Time";
                GetClientJobs();
            }

            UpdateUIState();
        }
コード例 #24
0
ファイル: confirm.aspx.cs プロジェクト: rubylocke/ASP.NET
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session["SalesPrice"] = tbSalesPrice.Text;
            //Session["DiscountAmt"] = lblOutDiscAmt.Text;
            //Session["TotalPrice"] = lblOutPrice.Text;


            Page previousPage = this.Page.PreviousPage;

            if (previousPage != null)
            {
                TextBox tbSalesPrice = (TextBox)PreviousPage.FindControl("tbSalesPrice");
                lblOutSalesPrice.Text = tbSalesPrice.Text;
                // if (tbSalesPrice.Text != null)
                //{
                //  lblOutSalesPrice.Text = tbSalesPrice.Text;
                // }

                Label lblOutDiscAmt = (Label)PreviousPage.FindControl("lblOutDiscAmt");
                //if (lblOutDiscAmt.Text !=null)
                if (lblOutDiscAmt.Text != "")
                {
                    lblOutDiscAmt1.Text = lblOutDiscAmt.Text;
                }
                // Label lblTotalPrice = (Label)PreviousPage.FindControl("lblOutPrice");
                Label lblOutPrice = (Label)PreviousPage.FindControl("lblOutPrice");
                lblOutPrice1.Text = lblOutPrice.Text;
                // if (lblOutPrice1.Text != null)
                //if (lblOutPrice1.Text != "")
                //{
                //    lblOutPrice1.Text = lblTotalPrice.Text;
                //}
            }
        }
コード例 #25
0
ファイル: PreviousPageTests.cs プロジェクト: kibiluzbad/Ifa
        public void PreviousPage_With_Current_Greater_Than_Pages_GetUrl_Return_Link_To_First_Page()
        {
            var previousPage = new PreviousPage(0, (pages, index) => string.Format("/Controller/Action/{0}/{1}", pages, index), 10);
            var text = previousPage.GetUrl();

            Assert.That(text, Is.EqualTo("/Controller/Action/10/1"));
        }
コード例 #26
0
ファイル: PreviousPageTests.cs プロジェクト: kibiluzbad/Ifa
        public void PreviousPage_With_Items_Per_Page_Equals_10_And_Current_Equals_2_GetUrl_Should_Return_Url_To_Page_1()
        {
            var previousPage = new PreviousPage(2, (pages, index) => string.Format("/Controller/Action/{0}/{1}", pages, index), 10);
            var text = previousPage.GetUrl();

            Assert.That(text, Is.EqualTo("/Controller/Action/10/1"));
        }
コード例 #27
0
ファイル: PreviousPageTests.cs プロジェクト: kibiluzbad/Ifa
        public void PreviousPage_With_Current_Equals_2_And_Items_Per_Page_Equals_10_GetText_Should_Return_Previous_Page_Text()
        {
            var previousPage = new PreviousPage(2, null, 2);
            var text = previousPage.GetText();

            Assert.That(text, Is.EqualTo("<"));
        }
コード例 #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Label1.Text = "用户名:" + PreviousPage.Name + "<br/>密&nbsp码:";
        TextBox pw = (TextBox)PreviousPage.FindControl("TextBox2");

        Label1.Text += pw.Text + "<br/>";
    }
コード例 #29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Nombre"] != null)
        {
        }
        else
        {
            Response.Redirect("FrmLoginEn.aspx");
        }
        llenarCombos();
        if (Page.PreviousPage != null)
        {
            if (!Label2.Visible)
            {
                string id = PreviousPage.getID();
                Label2.Text    = id;
                Label1.Visible = true;
                Label2.Visible = true;
                Producto p = daoProducto.Buscar(Convert.ToInt32(id));
                txtNombre.Text       = p.Nombre;
                txtModelo.Text       = p.Modelo;
                txtCantidad.Text     = Convert.ToString(p.Cantidad);
                txtPrecioC.Text      = Convert.ToString(p.Precio_compra);
                txtPrecioV.Text      = Convert.ToString(p.Precio_venta);
                txtDescripcion.Value = p.Descripcion;

                btnAceptar.Text = "Actualizar";
            }
        }
    }
コード例 #30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (PreviousPage != null && PreviousPage.IsCrossPagePostBack && PreviousPage.IsValid)
     {
         TextBox ppTextBox1 = (TextBox)PreviousPage.FindControl("TextBox1");
         Label1.Text = "Hello " + ppTextBox1.Text + "</br>";
     }
 }
コード例 #31
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (PreviousPage.IsCrossPagePostBack)
     {
         var tb = PreviousPage.FindControl("TextBox1") as TextBox;
         Label1.Text = tb.Text;
     }
 }
コード例 #32
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.PreviousPage != null)
     {
         HtmlInputText Sub = (HtmlInputText)PreviousPage.FindControl("EID");
         SubjectID.Text = Sub.Value.ToString();
     }
 }
コード例 #33
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.PreviousPage != null)
     {
         TextBox textBoxCari = (TextBox)PreviousPage.FindControl("textCari");
         LabelCari.Text = "Anda sedang mencari : " + textBoxCari.Text;
     }
 }