Ejemplo n.º 1
0
        public static bool AreAllProducitonOrdersComplete(IAJob job, DataAccessDataContext context)
        {
            StatusOption completeStatus = ProductionOrdersService.GetStatusOption(ProductionOrderStatus.Complete, context);

            int completedProductionOrders = job.IAProductionOrders.Where(row => row.IAProductionOrderStatusID == completeStatus.ID).Count();
            int totalProductionOrders = job.IAProductionOrders.Count();

            if (totalProductionOrders == completedProductionOrders)
            {
                return true;
            }

            return false;
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if(Session["IAJobID"] != null)
            {
                m_oIAJob = DataAccess.IAJobs.SingleOrDefault(row => row.IAJobID == (int)Session["IAJobID"]);
            }

            if(m_oIAJob != null)
            {
                if(!IsPostBack)
                {
                    // Load information
                    m_chkMusic.Checked = m_oIAJob.IsMusic;
                    m_chkSFX.Checked = m_oIAJob.IsSFX;
                    m_chkProduction.Checked = m_oIAJob.IsProduction;
                    m_chkConvert.Checked = m_oIAJob.IsConvert;

                    m_divNotesEdit.Visible = false;
                    m_divNotesView.Visible = false;

                    m_divFilesEdit.Visible = false;
                    m_divFilesView.Visible = false;

                    m_spanMusic.Visible = false;
                    m_spanSFX.Visible = false;
                    m_spanProduction.Visible = false;
                    m_spanConvert.Visible = false;

                    if(IsProducerView)
                    {
                        m_divNotesEdit.Visible = true;
                        m_divFilesEdit.Visible = true;
                    }
                    if(!IsProducerView)
                    {
                        m_spanMusic.Visible = true;
                        m_spanSFX.Visible = true;
                        m_spanProduction.Visible = true;
                        m_spanConvert.Visible = true;

                        m_divNotesView.Visible = true;
                        m_divFilesView.Visible = true;

                        m_txtMusicQuantity.Text = MemberProtect.Utility.FormatInteger(m_oIAJob.QuantityMusic);
                        m_txtMusicPrice.Text = MemberProtect.Utility.FormatDecimal(m_oIAJob.PriceMusic);

                        m_txtSFXQuantity.Text = MemberProtect.Utility.FormatInteger(m_oIAJob.QuantitySFX);
                        m_txtSFXPrice.Text = MemberProtect.Utility.FormatDecimal(m_oIAJob.PriceSFX);

                        m_txtProductionQuantity.Text = MemberProtect.Utility.FormatInteger(m_oIAJob.QuantityProduction);
                        m_txtProductionPrice.Text = MemberProtect.Utility.FormatDecimal(m_oIAJob.PriceProduction);

                        m_txtConvertQuantity.Text = MemberProtect.Utility.FormatInteger(m_oIAJob.QuantityConvert);
                        m_txtConvertPrice.Text = MemberProtect.Utility.FormatDecimal(m_oIAJob.PriceConvert);

                        m_divNotesForQC.InnerHtml = m_oIAJob.Notes;

                        SetDataOrginalsOffOfCurrentValue();

                        foreach(IAJobFile oIAJobFile in m_oIAJob.IAJobFiles)
                        {
                            m_divFiles.InnerHtml += string.Format("<a href='download.aspx?id={0}&type=job'>{1}</a><br />", oIAJobFile.IAJobFileID, oIAJobFile.Filename);
                        }
                    }

                    m_txtNotes.Text = m_oIAJob.Notes;
                }
            }
        }
Ejemplo n.º 3
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);
                        }
                    }
                }
            }
        }