Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["BoxInformation"] = null;
     if (presenter == null)
     {
         presenter = new Presenter.BoxDetailsPresenter(this);
     }
 }
        protected void Page_Init(object sender, EventArgs e)
        {
            if (presenter == null)
            {
                presenter = new Presenter.BoxDetailsPresenter(this);
            }

            ftbComments.EnableSsl = HttpContext.Current.Request.IsSecureConnection;
            ftbComments.SslUrl    = "blank.htm";

            if (!Page.IsPostBack)
            {
                pnlUserView.Visible = false;
            }

            if (Request.QueryString["ID"] != null)
            {
                btnAddRecord.Visible     = false;
                lblNumberOfBoxes.Visible = true;
                txtNumberOfBoxes.Visible = true;
                txtBoxLocation.Visible   = true;
                btnAddBoxes.Visible      = true;
                lblBoxLocation.Visible   = true;
                presenter.GetRecordById(Request.QueryString["ID"]);
            }
            else
            {
                lblNumberOfBoxes.Visible   = false;
                txtNumberOfBoxes.Visible   = false;
                lblBoxLocation.Visible     = false;
                txtBoxLocation.Visible     = false;
                btnAddBoxes.Visible        = false;
                btnDeleteRecord.Visible    = false;
                btnUpdateRecord.Visible    = false;
                lblCurrentFileName.Visible = false;
            }
            DrawBoxDetails();
        }