示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["BoxInformation"] = null;
     if (_mBoxDetailsPresenter == null)
     {
         _mBoxDetailsPresenter = new Presenter.BoxDetailsPresenter(this);
     }
 }
示例#2
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (_mBoxDetailsPresenter == null)
            {
                _mBoxDetailsPresenter = 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;
                _mBoxDetailsPresenter.GetEntry(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();
        }
 public void Setup()
 {
     fakeDataAccess = Substitute.For<IDataAccess>();
     fakeView = Substitute.For<IView>();
     target = new BoxDetailsPresenter(fakeView, fakeDataAccess);
 }
        protected void Page_Init(object sender, EventArgs e)
        {
            if (_mBoxDetailsPresenter == null) _mBoxDetailsPresenter = 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;
                _mBoxDetailsPresenter.GetEntry(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();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["BoxInformation"] = null;
     if (presenter == null) presenter = new Presenter.BoxDetailsPresenter(this);
 }