public void gvPartAssyList_OnRowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
        {
            if ((!e.Row.RowType.ToString().Trim().Equals(System.Web.UI.WebControls.ListItemType.Header.ToString())) & (!e.Row.RowType.ToString().Trim().Equals(System.Web.UI.WebControls.ListItemType.Footer.ToString())))
            {
                System.Web.UI.WebControls.Label lbl = new Label();

                try
                {
                    lbl = (Label)e.Row.Cells[0].FindControl("lblBOMPartID");
                    PART compPart = SQMModelMgr.LookupPart(Convert.ToDecimal(lbl.Text), SessionManager.SessionContext.ActiveCompany().COMPANY_ID);  // mt - todo: get the component part info from the original query
                    if (compPart != null)
                    {
                        lbl      = (Label)e.Row.Cells[0].FindControl("lblCompPartNum");
                        lbl.Text = compPart.PART_NUM;
                        lbl      = (Label)e.Row.Cells[0].FindControl("lblCompPartName");
                        lbl.Text = compPart.PART_NAME;
                        lbl      = (Label)e.Row.Cells[0].FindControl("lblCompSerial");
                        lbl.Text = compPart.SERIAL_NUM;
                    }
                }
                catch
                {
                }
            }
        }
示例#2
0
        protected void lnkPartView_Click(object sender, EventArgs e)
        {
            LinkButton lnk    = (LinkButton)sender;
            decimal    partID = Convert.ToDecimal(lnk.CommandArgument.ToString().Trim());

            SessionManager.Part = SQMModelMgr.LookupPart(entities, partID, "", SessionManager.SessionContext.ActiveCompany().COMPANY_ID, false);

            Response.Redirect("/Admin/Administrate_ViewPart.aspx");
        }
示例#3
0
 protected void uclAdminList_OnPartClick(decimal partID)
 {
     SessionManager.Part   = SQMModelMgr.LookupPart(entities, partID, "", SessionManager.SessionContext.ActiveCompany().COMPANY_ID, false);
     ctlPlanMgr            = new CtlPlanMgr();
     pnlSearchList.Visible = uclAdminList.PartListPanel.Visible = false;
     uclSearchBar.SetButtonsEnabled(true, true, true, false, false, false);
     uclSearchBar.SetButtonsNotClicked();
     EnableControls(divPageBody.Controls, false);
     SetupPage();
 }
示例#4
0
        public PART GetPart(decimal partID)
        {
            PART part;

            part = this.RecordList.Where(l => l.Part.PART_ID == partID).Select(l => l.Part).FirstOrDefault();
            if (part == null)
            {
                part = SQMModelMgr.LookupPart(this.Entities, partID, "", 1, false);
            }
            return(part);
        }
 protected void OnPartListClick(decimal partID)
 {
     if (partID > 0)
     {
         PART part = SQMModelMgr.LookupPart(_entities, partID, "", 0, false);
         rsbPart.Text = part.PART_NUM;
         if (OnSearchItemSelect != null)
         {
             OnSearchItemSelect(partID.ToString());
         }
     }
 }
示例#6
0
 protected void Page_PreRender(object sender, EventArgs e)
 {
     RegisterAppPage(WebSiteCommon.CleanPageName(Request.Path));
     if ((bool)SessionManager.ReturnStatus)
     {
         vw_CustPlantPart plantPart = (vw_CustPlantPart)SessionManager.ReturnObject;
         SessionManager.Part = SQMModelMgr.LookupPart(entities, plantPart.PART_ID, "", plantPart.CUST_COMPANY_ID, false);
         SessionManager.PartSearchCriteria = (SessionManager.Part.PART_NUM + "~" + rblSearchPart.SelectedValue);
         SessionManager.ReturnObject       = null;
         SessionManager.ReturnStatus       = false;
         Response.Redirect("/Admin/Administrate_ViewPart.aspx");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if ((bool)SessionManager.ReturnStatus)
                {
                    vw_CustPlantPart plantPart = (vw_CustPlantPart)SessionManager.ReturnObject;
                    SessionManager.Part         = SQMModelMgr.LookupPart(plantPart.PART_ID, plantPart.CUST_COMPANY_ID);
                    SessionManager.ReturnObject = null;
                    SessionManager.ReturnStatus = false;
                }

                // SessionManager.Part = SQMModelMgr.LookupPart(6, 1); /////// mt - td
                if (SessionManager.Part != null)
                {
                    SetupPage();
                }
            }
        }
        private void OnPartSelect(string partID)
        {
            PART part = SQMModelMgr.LookupPart(new PSsqmEntities(), Convert.ToDecimal(partID), "", SessionManager.PrimaryCompany().COMPANY_ID, false);

            if (part != null)
            {
                IssueCtl().qualityIssue.IssueOccur.PART_ID = part.PART_ID;
                PartData partData = SQMModelMgr.LookupPartData(new PSsqmEntities(), SessionManager.PrimaryCompany().COMPANY_ID, part.PART_ID);
                partData.Locations();
                IssueCtl().qualityIssue.AddPartInfo(partData);
                lblPartDesc.Text = part.PART_NAME;
                ddlResponsibleLocation.Items.Clear();
                ddlResponsibleLocation.Items.Add(new RadComboBoxItem(IssueCtl().qualityIssue.DetectedLocation.Company.COMPANY_NAME + ", " + IssueCtl().qualityIssue.DetectedLocation.Plant.PLANT_NAME, IssueCtl().qualityIssue.DetectedLocation.Plant.PLANT_ID.ToString()));
                if (IssueCtl().qualityIssue.Partdata.B2BList != null)
                {
                    foreach (BusinessLocation location in IssueCtl().qualityIssue.Partdata.B2BList)
                    {
                        if (ddlResponsibleLocation.Items.FindItemByValue(location.Plant.PLANT_ID.ToString()) == null)
                        {
                            ddlResponsibleLocation.Items.Add(new RadComboBoxItem(location.Company.COMPANY_NAME + ", " + location.Plant.PLANT_NAME, location.Plant.PLANT_ID.ToString()));
                        }
                    }
                    if (IssueCtl().qualityIssue.Incident.RESP_PLANT_ID.HasValue)
                    {
                        ddlResponsibleLocation.SelectedValue = IssueCtl().qualityIssue.Incident.RESP_PLANT_ID.ToString();
                    }
                    else if (ddlResponsibleLocation.Items.Count > 0)
                    {
                        ddlResponsibleLocation.SelectedIndex = 0;
                    }

                    GetResponsibleList();
                }
                updResponsible.Update();
            }
        }