示例#1
0
        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();
        }
示例#2
0
        // GET: Lease
        public ActionResult Index()
        {
            SlipDB slip = new SlipDB();

            ModelState.Clear();

            return(View(SlipDB.GetAllAvailableDock()));
        }
示例#3
0
        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);
        }
示例#4
0
        // 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());
            }
        }
示例#5
0
 // GET: SlipAndLease
 public ActionResult Index()
 {
     Models.SlipDB spd = new Models.SlipDB();
     ModelState.Clear();
     return(View(SlipDB.GetAllHoldLease()));
 }