BoxInformation.ViewRecord.AddBoxes_Click C# (CSharp) Метод

AddBoxes_Click() защищенный Метод

protected AddBoxes_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        protected void AddBoxes_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["ID"] != null)
            {
                if (txtBoxLocation.Text.Length > 1)
                {
                    if (boxData != null)
                    {
                        boxData.Add(new KeyValuePair<string, int>(txtBoxLocation.Text, int.Parse(txtNumberOfBoxes.Text)));
                    }
                    else
                    {
                        boxData = new List<KeyValuePair<string, int>>();
                        boxData.Add(new KeyValuePair<string, int>(txtBoxLocation.Text, int.Parse(txtNumberOfBoxes.Text)));
                    }
                }

                Presenter.UpdateRecord();
                txtBoxLocation.Text = "";
                txtNumberOfBoxes.Text = "";

                Presenter.GetRecordById(Request.QueryString["ID"]);
                DrawBoxDetails();
            }
            else
            {
                Response.Redirect("search.aspx");
            }
        }