//for saving lease protected void btnLease_Click(object sender, EventArgs e) { MarinaManager mm = new MarinaManager(); int custID = int.Parse(Session["CustomerID"].ToString()); int spId = int.Parse(txtSlipLease.Text); mm.SaveLease(custID, spId); //Shows the updated leased slip list grdLesSlp.DataSource = mm.GetLeaseSlip(); grdLesSlp.DataBind(); }
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(); } }