Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Context.User.Identity.IsAuthenticated)
            {
                lblWelcome.Text = $"Welcome {Context.User.Identity.Name}";
            }

            //Binding data to the dropdown box
            if (!IsPostBack)
            {
                var manager = new MarinaManager();
                cboDock.DataSource = manager.GetDock();
                cboDock.DataTextField = "Name";
                cboDock.DataValueField = "ID";
                cboDock.DataBind();
                //binding slip to grid
                grdSlip.DataSource = manager.GetSlip();
                grdSlip.DataBind();
                //binding lease slip
                grdLesSlp.DataSource = manager.GetLeaseSlip();
                grdLesSlp.DataBind();
            }
        }