示例#1
0
        protected void AddOrder_Click(object sender, EventArgs e)
        {
            OrderDAO orderMgr = new OrderDAO();
            Order    order    = new Order();

            order.OrderNumber = int.Parse(NewOrderNumber.Text);
            order.Description = NewDescription.Text;
            Order newOrder = orderMgr.SaveOrder(order);

            Workstation pack = new Packstation();
        }
        public override bool IsValid(object value)
        {
            Packstation packstation = value as Packstation;

            if (packstation == null)
            {
                return(false);
            }

            PackstationsStorage packstationsStorageInst = PackstationsStorage.GetInstance();

            var foundPackstation = packstationsStorageInst.GetPackstation(packstation.Number);

            if (foundPackstation != null && foundPackstation.IsOpen)
            {
                return(true);
            }

            return(false);
        }
示例#3
0
        protected void CreateWorkstation_Click(object sender, EventArgs e)
        {
            PackstationDAO packstationMgr = new PackstationDAO();
            Workstation    packstation    = new Packstation();

            packstation.ID               = 0;
            packstation.Type             = 2;
            packstation.Status           = 2;
            packstation.CreatedOn        = DateTime.Today;
            packstation.Barcode          = "WS00000000000001";
            packstation.WorkstationLabel = "WS01";
            packstation.CreatedBy        = User.Identity.Name;
            packstation.TrolleyID        = 1;
            packstation.LastChangedOn    = DateTime.Today;
            packstation.LastChangedBy    = User.Identity.Name;
            packstation.IsInternational  = "F";

            decimal returnValue = packstationMgr.Add(packstation);

            packstation.ID = returnValue;
        }