protected void GridViewSlip_Available() { GridViewRow dock = GridViewDock0.SelectedRow; LblSelectedDock.Text = dock.Cells[1].Text; List <Slip> slip_CurrentDock = SlipDB.GetSlips(Convert.ToInt32(dock.Cells[0].Text)); List <Lease> lease_CurrentLeased = LeaseDB.GetLeases(); List <Slip> slip_Available = new List <Slip>(); bool aFlag = true; foreach (var i in slip_CurrentDock) { aFlag = true; foreach (var j in lease_CurrentLeased) { if (i.ID == j.SlipID) { aFlag = false; break; } } if (aFlag) { slip_Available.Add(i); } } GridViewSlip0.DataSource = slip_Available; GridViewSlip0.DataBind(); }
// GET: Lease public ActionResult Index() { SlipDB slip = new SlipDB(); ModelState.Clear(); return(View(SlipDB.GetAllAvailableDock())); }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { SlipDB docksDropDown = new SlipDB(); docksDropDown.DocksDropDown(ddlDocks); } int dock = Convert.ToInt32(ddlDocks.SelectedValue); SlipDB slipGridView = new SlipDB(); slipGridView.BindSlipGrid(dock, gvAvailableSlips); }
// GET: Products/Details/5 public ActionResult Details(string id) { SlipAndLease currentSlipAndLease = SlipDB.GetSlipAndLeaseByID(id); if (currentSlipAndLease != null) { //ViewBag.ImagePath = "~/Content/Images/" + currentProduct.ImageFile; return(View(currentSlipAndLease)); } else { return(View()); } }
// GET: SlipAndLease public ActionResult Index() { Models.SlipDB spd = new Models.SlipDB(); ModelState.Clear(); return(View(SlipDB.GetAllHoldLease())); }