protected void UpdateDisplay()
        {
            List <ProductionItem> items = ProductionRepository.GetAllProductionItems(PermissionHelper.GetCurrentAssemblyTypeId());

            //update all dvStations
            foreach (DataViewItem dvi in dvStations)
            {
                StationInfo info = dvi.DataItem as StationInfo;

                IEnumerable <ProductionItem> pi = items.Where(x => x.LineId == info.LineId && x.StationId == info.StationId);
                if (pi.Count() == 0)
                {
                    //no vehicle in the station > clear the station
                }
                else
                {
                    //there are vehicle in the station
                    if (info.Capacity == 1)
                    {
                        //show the vehicle info
                    }
                    else
                    {
                        //show the number of vehicle in station
                    }
                }
            }
        }
 protected void cbpDashboard_Callback(object sender, CallbackEventArgsBase e)
 {
     if (string.IsNullOrWhiteSpace(e.Parameter))
     {
         InitDisplay(PermissionHelper.GetCurrentAssemblyTypeId());
         //UpdateDisplay();
     }
 }
        protected override bool OnInit(object sender, EventArgs e)
        {
            int assemblyTypeId = Request.QueryString["AssemblyTypeId"].ToInt32(0);

            if (assemblyTypeId == 0)
            {
                assemblyTypeId = PermissionHelper.GetCurrentAssemblyTypeId();
            }

            if (!IsPostBack)
            {
                InitDisplay(assemblyTypeId);
            }

            return(true);
        }
Example #4
0
        private void LoadToolAssignmentPopup(int toolInvId)
        {
            //reset assignment
            cmbProductionLines.SelectedItem  = null;
            cmbAssemblySections.SelectedItem = null;
            cmbStations.SelectedItem         = null;

            //cmbProductionLines.DataBind();

            ////get current station assignment
            //ToolAssignmentStation tap = GetStationAssignment(toolInvId);
            //Session["ToolAssignmentStation"] = tap;

            Ebiz.Tids.CV.Models.ToolInventory ti = GetToolInventory(toolInvId);

            if (ti.AssemblyTypeId != null && ti.AssemblyTypeId.Value > 0 &&
                ti.ProductionLineId != null && ti.ProductionLineId.Value > 0 &&
                ti.AssemblySectionId != null && ti.AssemblySectionId.Value > 0 &&
                ti.StationId != null && ti.StationId.Value > 0)
            {
                GetDDLAssemblyTypes(ti.AssemblyTypeId.Value);
                GetDDLProductionLines(cmbAssemblyTypes.Value.ToInt32(0), ti.ProductionLineId.Value);
                GetDDLAssemblySections(cmbProductionLines.Value.ToInt32(0), ti.AssemblySectionId.Value);
                GetDDLStations(cmbAssemblySections.Value.ToInt32(0), ti.StationId.Value);

                txtSetNM.Value = ti.SetNM;
                GetCHKTypes(ti.Id);
            }
            else
            {
                GetDDLAssemblyTypes(PermissionHelper.GetCurrentAssemblyTypeId());
                GetDDLProductionLines(cmbAssemblyTypes.Value.ToInt32(0));
                GetDDLAssemblySections(cmbProductionLines.Value.ToInt32(0));
                GetDDLStations(cmbAssemblySections.Value.ToInt32(0));

                txtSetNM.Value = "";
                GetCHKTypes(0);
            }
        }