コード例 #1
0
        public static bool AreAllSpotsFinished(IAProductionOrder po, DataAccessDataContext context)
        {
            StatusOption completeStatus = SpotService.GetStatusOption(SpotStatus.Finished, context);
            int totalSpots = po.IASpots.Count();
            int spotsFinished = po.IASpots.Where(row => row.IASpotStatusID == completeStatus.ID).Count();

            if (totalSpots == spotsFinished)
            {
                return true;
            }

            return false;
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if(Request.QueryString["jid"] != null)
            {
                Session["IAJobID"] = MemberProtect.Utility.ValidateInteger(Request.QueryString["jid"]);
            }

            if(Request.QueryString["poid"] != null)
            {
                Session["IAProductionOrderID"] = MemberProtect.Utility.ValidateInteger(Request.QueryString["poid"]);
            }

            if(Session["IAJobID"] != null)
            {
                m_oIAJob = DataAccess.IAJobs.SingleOrDefault(row => row.IAJobID == (int)Session["IAJobID"]);
            }

            if(Session["IAProductionOrderID"] != null)
            {
                m_oIAProductionOrder = DataAccess.IAProductionOrders.SingleOrDefault(row => row.IAProductionOrderID == (int)Session["IAProductionOrderID"]);
            }
            else
            {
                // Quality Control cannot create new PO's, so if no PO is found, return them to their dashboard
                if(!IsProducerView)
                {
                    Response.Redirect("~/staff-dashboard.aspx?filter=inproduction");
                }
            }

            LoadVisibility();

            if(!IsPostBack)
            {
                SetupBreadcrumbsAndBackLinks();

                RefreshSpotList();
                RefreshFeeList();

                SetupTalentSelectOptions();

                if(!IsProducerView)
                {
                    if(Request.QueryString["sid"] != null)
                    {
                        Session["IASpotID"] = MemberProtect.Utility.ValidateInteger(Request.QueryString["sid"]);
                    }

                    if(Session["IASpotID"] != null)
                    {
                        IASpotID = (int)Session["IASpotID"];

                        IASpot oIASpot = DataAccess.IASpots.SingleOrDefault(row => row.IASpotID == IASpotID);
                        if(oIASpot != null)
                        {
                            LoadSpotForm(oIASpot);
                        }
                    }
                }
            }
        }
コード例 #3
0
        protected void OnTalentAssigned(object sender, EventArgs e)
        {
            if(Session["IAProductionOrderID"] != null)
            {
                m_oIAProductionOrder = DataAccess.IAProductionOrders.SingleOrDefault(row => row.IAProductionOrderID == (int)Session["IAProductionOrderID"]);

                LoadVisibility();
            }
        }