protected void Page_Load(object sender, EventArgs e) { var manager = new MarinaManager(); var docks = manager.GetDocks(); ddlDocks.DataSource = docks; ddlDocks.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var mgr = new MarinaManager(); uxDocks.DataSource = mgr.GetDocks(); uxDocks.DataTextField = "Name"; uxDocks.DataValueField = "ID"; uxDocks.DataBind(); uxDocks.SelectedIndex = 0; uxDocks_SelectedIndexChanged(this, e); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var manager = new MarinaManager(); var docks = manager.GetDocks(); ddlDocks.DataSource = docks; ddlDocks.DataBind(); var availableSlips = manager.GetAvailableSlipIDs(1); ddlAvailable.DataSource = availableSlips; ddlAvailable.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { //if this the first time page load if (!IsPostBack) { var mgr = new MarinaManager(); //populate the docks drop down list uxDocks.DataSource = mgr.GetDocks(); uxDocks.DataTextField = "Name"; uxDocks.DataValueField = "ID"; uxDocks.DataBind(); uxDocks.SelectedIndex = 0; } }
protected void btnLease_Click(object sender, EventArgs e) { var manager = new MarinaManager(); var customer = (Customer)Session["Customer"]; int userID = customer.ID; int slipID = Convert.ToInt32(ddlAvailable.SelectedValue); manager.AddLeaseToCust(userID, slipID); var docks = manager.GetDocks(); ddlDocks.DataSource = docks; ddlDocks.DataBind(); var availableSlips = manager.GetAvailableSlipIDs(1); ddlAvailable.DataSource = availableSlips; ddlAvailable.DataBind(); CurrentLeases.Refresh(); }