// auto fill
    protected void btnFillCustomerInfo_Click(object sender, EventArgs e)
    {
        int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]);
        if (orderId > 0)
        {
            AdminOrderBiz obiz = new AdminOrderBiz();
            int customerID = obiz.GetOrderCustomer(orderId);

            if (customerID > 0)
            {
                AdminUserBiz biz = new AdminUserBiz();
                D_UserInfo ui = biz.GetUserInfo(customerID);

                TextBox tbFirstname = fvCreditCard.FindControl("firstNameTextBox") as TextBox;
                if (tbFirstname != null)
                {
                    TextBox tbLastname = fvCreditCard.FindControl("lastNameTextBox") as TextBox;
                    TextBox tbAddress = fvCreditCard.FindControl("addressTextBox") as TextBox;
                    TextBox tbCity = fvCreditCard.FindControl("cityTextBox") as TextBox;
                    TextBox tbState = fvCreditCard.FindControl("stateTextBox") as TextBox;
                    TextBox tbZip = fvCreditCard.FindControl("zipTextBox") as TextBox;
                    Controls_CountrySelector country = fvCreditCard.FindControl("CountrySelector1") as Controls_CountrySelector;

                    tbFirstname.Text = ui.firstName;
                    tbLastname.Text = ui.lastName;
                    tbAddress.Text = ui.address;
                    tbCity.Text = ui.city;
                    tbState.Text = ui.state;
                    tbZip.Text = ui.zip;
                    country.CountryCode = ui.country;
                }
            }
        }
    }
示例#2
0
 protected void btnUndel_Click(object sender, EventArgs e)
 {
     lbMsg.Text = "";
     AdminUserBiz biz = new AdminUserBiz();
     string userIDs = GetSelectedUsers();
     if (userIDs.Length > 0)
     {
         int c = biz.SetUserStatus(userIDs, 1);
         lbMsg.Text = c.ToString() + " users un-deleted.";
         btnSearch_Click(null, null);
     }
 }