Exemple #1
0
        private List <IUserStation> RetrieveUserStations()
        {
            var result = new List <IUserStation>();

            try
            {
                var retrieveStationsRequest = new JSONRequest(MethodNames.user_getStationList, false, RequiredInfo);
                var res = new JSONResult(retrieveStationsRequest.StringRequestAsync().Result);

                if (res.IsFault)
                {
                    Messenger.Default.Send(new FaultMessage(res.Fault.Message));
                    return(null);
                }

                var data = res.Result;
                UserStationsChecksum = data["checksum"].ToString();
                foreach (var station in data["stations"])
                {
                    result.Add(StationFactory.CreateUserStation(RequiredInfo, station));
                }
            }
            catch (Exception ex)
            {
                Messenger.Default.Send(new FaultMessage(ex.Message, ex));
                return(null);
            }

            return(result);
        }
Exemple #2
0
        private void InitItems(string pPlanCode,string pStationCode)
        {
            StationEntity ent1 = StationFactory.GetByKey(pStationCode);
            WorkunitCode = "";
            txtWorkUnit.Text = ent1.STATION_NAME;
            PlanEntity ent2 = PlanFactory.GetByKey(pPlanCode);
            OrderCode = ent2.ORDER_CODE;
 
            List<PlanStandardBOMEntity> lstBom = PlanStandardBOMFactory.GetByOrderCode(OrderCode);
            List<PlanStandardBOMEntity> lstBom1 = (from p in lstBom
                                                   where p.VIRTUAL_ITEM_CODE == "X" && p.WORKUNIT_CODE == WorkunitCode
                                                   select p).ToList<PlanStandardBOMEntity>();
            
            if (lstBom1.Count == 0)
            {
                cmbVItemCode.SelectedIndex = -1;
                cmbVItemCode.Enabled = false;
            }
            else
            {
                cmbVItemCode.Items.Clear();
                cmbVItemCode.Items.Add("总装件");
                for (int i = 0; i < lstBom1.Count; i++)
                {
                    cmbVItemCode.Items.Add(lstBom1[i].ITEM_CODE + "-" + lstBom1[i].ITEM_NAME);
                }
                cmbVItemCode.Enabled = true;
            }

        }
Exemple #3
0
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxTextBox  uCode  = ASPxGridView1.FindEditFormTemplateControl("txtStationCode") as ASPxTextBox;
        ASPxTextBox  uName  = ASPxGridView1.FindEditFormTemplateControl("txtStationName") as ASPxTextBox;
        ASPxComboBox uTcode = ASPxGridView1.FindEditFormTemplateControl("dropStaionType") as ASPxComboBox;
        ASPxComboBox uPcode = ASPxGridView1.FindEditFormTemplateControl("dropPlineCode") as ASPxComboBox;
        ASPxTextBox  uScode = ASPxGridView1.FindEditFormTemplateControl("dropStaionArea") as ASPxTextBox;

        StationEntity s = new StationEntity()
        {
            COMPANY_CODE      = theCompanyCode,
            PLINE_CODE        = uPcode.Value.ToString(),
            STATION_CODE      = uCode.Text.Trim(),
            STATION_NAME      = uName.Text.Trim(),
            STATION_TYPE_CODE = uTcode.Value as string,
            STATION_AREA_CODE = uScode.Value as string,
            WORKUNIT_CODE     = e.NewValues["WORKUNIT_CODE"] as string
        };

        s.RMES_ID = s.STATION_CODE;
        StationFactory.Insert(s);

        //string Sql = "INSERT INTO CODE_STATION (COMPANY_CODE,STATION_CODE,STATION_NAME,STATION_TYPE_CODE,PLINE_CODE,STATION_AREA_CODE) "
        //     + "VALUES('" + theCompanyCode + "','" + uCode.Text.Trim() + "','" + uName.Text.Trim() + "','" + uTcode.Value.ToString() + "','" + uPcode.Value.ToString() + "','" + uScode.Value.ToString() + "')";
        //dc.ExeSql(Sql);

        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        setCondition();
    }
Exemple #4
0
        //private void Init()
        //{

        //    List<AndonAlertEntity> andon = AndonFactory.GetByTime();
        //    for (int i = 0; i < andon.Count; i++)
        //    {
        //        if (GridAndon.Rows.Count < andon.Count)
        //            GridAndon.Rows.Add();
        //        StationEntity Stationen = StationFactory.GetByPrimaryKey(andon[i].LOCATION_CODE);
        //        LocationEntity location = LocationFactory.GetByMasterKey(Stationen.RMES_ID);
        //        GridAndon.Rows[i].Cells[0].Value = andon[i].ANDON_ALERT_TIME.ToString("MM/dd/HH:mm");
        //        GridAndon.Rows[i].Cells[1].Value = Stationen.STATION_NAME;
        //       // GridAndon.Rows[i].Cells[2].Value = location.LOCATION_NAME;
        //        GridAndon.Rows[i].Cells[3].Value = andon[i].ANDON_ALERT_CONTENT.Substring(3, 4);
        //    }
        //}
        private void Init()
        {
            //textBox.Text = "123";
            List <AndonAlertEntity> andon = AndonFactory.GetByTime();
            string string1 = "";//, string2, string3;
            string string2 = "";
            string string3 = "";
            string string4 = "";
            string str1    = "";

            string[] str = new string[] { "", "", "" };
            for (int i = 0; i < andon.Count; i++)
            {
                StationEntity  Stationen = StationFactory.GetByPrimaryKey(andon[i].LOCATION_CODE);
                LocationEntity location  = LocationFactory.GetByMasterKey(Stationen.RMES_ID);
                TeamEntity     team      = TeamFactory.GetByTeamCode(andon[i].TEAM_CODE);
                string1 = andon[i].ANDON_ALERT_TIME.ToString("MM/dd/HH:mm");
                string2 = Stationen.STATION_NAME;
                string3 = team.TEAM_NAME;
                string4 = andon[i].ANDON_ALERT_CONTENT.ToString();
                str[i]  = string1 + " ," + string2 + string3 + string4;

                str1         = str1 + str[i] + "\r\n";
                textBox.Text = str1;
            }
        }
Exemple #5
0
        private void setCondition()
        {
            //绑定表数据
            //string sql = "select t.RMES_ID,t.plineCODE,b.ROUTING_NAME,t.ITEMCODE,t.ITEMNAME,t.ITEMDESCRIPTION,t.MINVALUE,t.MAXVALUE,t.STANDARDVALUE,t.UNITNAME,decode(t.UNITTYPE,'N','数值','T','文字','B','判断','F','文件')UNITTYPE,t.ORDERING from qms_standard_item t "
            //    + " left join data_pline_routing b on t.plineCODE=b.ROUTING_CODE order by t.plineCODE,t.ITEMCODE";
            //DataTable dt = dc.GetTable(sql);
            List <DetectErrorItemEntity> entities = db.Fetch <DetectErrorItemEntity>("");

            ASPxGridView1.DataSource = entities;

            GridViewDataComboBoxColumn colPline      = ASPxGridView1.Columns["PLINE_CODE"] as GridViewDataComboBoxColumn;
            List <ProductLineEntity>   plineEntities = ProductLineFactory.GetAll();

            colPline.PropertiesComboBox.DataSource = plineEntities;
            colPline.PropertiesComboBox.ValueField = "PLINE_CODE";
            colPline.PropertiesComboBox.TextField  = "PLINE_NAME";


            GridViewDataComboBoxColumn colworkUnit    = ASPxGridView1.Columns["WORKUNIT_CODE"] as GridViewDataComboBoxColumn;
            List <StationEntity>       statinEntities = StationFactory.GetAll();

            colworkUnit.PropertiesComboBox.DataSource = statinEntities;
            colworkUnit.PropertiesComboBox.ValueField = "WORKUNIT_CODE";
            colworkUnit.PropertiesComboBox.TextField  = "STATION_NAME";

            ASPxGridView1.DataBind();
        }
Exemple #6
0
        private IUserStation RetrieveExtendedUserStationInfo(string stationToken)
        {
            IUserStation result = null;

            try
            {
                var retrieveExUserStationInfoRequest = new JSONRequest(
                    MethodNames.station_getStation,
                    false,
                    RequiredInfo,
                    new KeyValuePair <string, object>("stationToken", stationToken));
                var res = new JSONResult(retrieveExUserStationInfoRequest.StringRequestAsync().Result);

                if (res.IsFault)
                {
                    Messenger.Default.Send(new FaultMessage(res.Fault.Message));
                    return(null);
                }

                var data = res.Result;
                result = StationFactory.CreateUserStation(RequiredInfo, data);
            }
            catch (Exception ex)
            {
                Messenger.Default.Send(new FaultMessage(ex.Message, ex));
                return(null);
            }

            return(result);
        }
Exemple #7
0
    public GameObject SpawnStation(long id, StationType type, Player player, Vector3 position, Quaternion rotation, float constructionProgress, bool setActive)
    {
        if (!PlayerDatabase.Instance.IsValidPlayer(player))
        {
            throw new System.Exception("Not a valid player");
        }

        GameObject prefab = trueStationDictionary[type];

        if (prefab == null)
        {
            throw new System.Exception("Station type not supported");
        }
        else
        {
            GameObject newStation = Instantiate(prefab, position, rotation);
            PlayerDatabase.Instance.AddObjectToPlayer(newStation, player);
            newStation.GetComponent <StationController>().Station              = StationFactory.getInstance().CreateStation(type);
            newStation.GetComponent <StationController>().Constructed          = constructionProgress >= 100;
            newStation.GetComponent <StationController>().constructionProgress = constructionProgress;
            newStation.SetActive(setActive);
            newStation.name += " " + player;

            newStation.GetComponent <MapObject>().id = id;

            return(newStation);
        }
    }
Exemple #8
0
    private void setCondition()
    {
        //初始化GRIDVIEW
        List <StationEntity> all = StationFactory.GetAll();

        ASPxGridView1.DataSource = all;
        ASPxGridView1.DataBind();
    }
Exemple #9
0
        public StationMusic(JToken musicData)
        {
            var artistsData = musicData["artists"];

            if (artistsData != null)
            {
                Artists = from artist in artistsData select StationFactory.GetArtistInfo(artist);
            }
        }
Exemple #10
0
        protected void ASPxComboBoxStationSub_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string plineCode = e.Parameter;
            List <StationEntity> stationEntities = StationFactory.GetByProductLine(plineCode);
            ASPxComboBox         station         = sender as ASPxComboBox;

            station.DataSource = stationEntities;
            station.ValueField = "RMES_ID";
            station.TextField  = "STATION_NAME";
            station.DataBind();
        }
Exemple #11
0
        //public void ASPxComPline_DataBinding(object sender, EventArgs e)
        //{
        //    ASPxComboBox comPline = sender as ASPxComboBox;
        //    List<ProductLineEntity> all = ProductLineFactory.GetAll();
        //    comPline.DataSource = all;
        //    comPline.TextField = "PLINE_NAME";
        //    comPline.ValueField = "PLINE_CODE";
        //}

        protected void WorkUnit_Callback(object sender, CallbackEventArgsBase e)
        {
            string               pline    = e.Parameter;
            ASPxComboBox         location = (ASPxComboBox)sender;
            List <StationEntity> all      = StationFactory.GetByProductLine(pline);

            location.DataSource = all;
            location.TextField  = "LOCATION_NAME";
            location.ValueField = "WORKUNIT_CODE";
            location.DataBind();
        }
Exemple #12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int id = this.StationID;
         if (id > 0)
         {
             StationClass station = StationFactory.CreateStationByStationID(id);
             this.txtOldStationName.Text = station.StationName;
         }
     }
 }
Exemple #13
0
        protected void comWorkUnit_Callback(object sender, CallbackEventArgsBase e)
        {
            //ASPxComboBox _pline = ASPxGridView1.FindEditFormTemplateControl("combPline") as ASPxComboBox;
            string pline = e.Parameter;

            List <StationEntity> stations = StationFactory.GetByProductLine(pline);
            ASPxComboBox         workUnit = (ASPxComboBox)sender;

            workUnit.DataSource = stations;
            workUnit.TextField  = "STATION_NAME";
            workUnit.ValueField = "WORKUNIT_CODE";

            workUnit.DataBind();
        }
Exemple #14
0
        public void BindData()
        {
            List <LineSideStoreEntity> allEntity = LinesideStoreFactory.GetAll();

            ASPxGridView1.DataSource = allEntity;

            GridViewDataComboBoxColumn comPline = ASPxGridView1.Columns["PLINE_CODE"] as GridViewDataComboBoxColumn;
            List <ProductLineEntity>   allPline = ProductLineFactory.GetAll();

            comPline.PropertiesComboBox.DataSource = allPline;
            comPline.PropertiesComboBox.TextField  = "PLINE_NAME";
            comPline.PropertiesComboBox.ValueField = "PLINE_CODE";

            GridViewDataComboBoxColumn comWorkUnit = ASPxGridView1.Columns["WORKUNIT_CODE"] as GridViewDataComboBoxColumn;
            List <StationEntity>       allStation  = StationFactory.GetAll();

            comWorkUnit.PropertiesComboBox.DataSource = allStation;
            comWorkUnit.PropertiesComboBox.TextField  = "STATION_NAME";
            comWorkUnit.PropertiesComboBox.ValueField = "WORKUNIT_CODE";


            GridViewDataComboBoxColumn comWorkShop = ASPxGridView1.Columns["WORKSHOP_CODE"] as GridViewDataComboBoxColumn;
            DataTable dt = new DataTable();

            dt.Columns.Add("text");
            dt.Columns.Add("value");
            dt.Rows.Add("园区", 8101);
            dt.Rows.Add("基地", 8102);


            comWorkShop.PropertiesComboBox.DataSource = dt;
            comWorkShop.PropertiesComboBox.TextField  = "text";
            comWorkShop.PropertiesComboBox.ValueField = "value";


            GridViewDataComboBoxColumn comStoreType = ASPxGridView1.Columns["STORE_TYPE"] as GridViewDataComboBoxColumn;
            DataTable dt1 = new DataTable();

            dt1.Columns.Add("text");
            dt1.Columns.Add("value");
            dt1.Rows.Add("线边库", 0);
            dt1.Rows.Add("中心仓库", 1);


            comStoreType.PropertiesComboBox.DataSource = dt;
            comStoreType.PropertiesComboBox.TextField  = "text";
            comStoreType.PropertiesComboBox.ValueField = "value";

            ASPxGridView1.DataBind();
        }
Exemple #15
0
 public void GetByPlanStatonZJTS(string CompanyCode, string PlanCode, string PlineCode, string StationCode, string Sn, string fdjxl, string so, string stationcode1)
 {
     try
     {
         //大线生成计划对应的站点bom是根据当前登录的站点StationCode,返修点是根据选择的站点,这两个变量统一,但生成snbomtemp时,返修点要根据返修站点当前登录站点生成
         //调用存储过程 获取替换后的站点BOM 插入data_sn_bom_temp和rstbomqd、rstbomts
         StationEntity ent_st       = StationFactory.GetBySTATIONCODE(StationCode);
         string        station_name = ent_st.STATION_NAME;
         ProductDataFactory.PL_QUERY_ZJTS(so, StationCode, PlineCode, fdjxl, PlanCode, Sn);
     }
     catch (Exception e1)
     {
         return;
     }
 }
Exemple #16
0
        private void initComboBoxByCompany()
        {
            initing = true;
            object val = null;

            val = comboBox1.SelectedValue;
            try
            {
                if (val != null)
                {
                    comboBox2.DataSource    = ProductLineFactory.GetByCompanyCode(val.ToString());
                    comboBox2.SelectedValue = DB.ReadConfigLocal("PRODUCTLINE_CODE");
                    setComboxBoxCurrent(comboBox2);

                    val = comboBox2.SelectedValue;
                    if (val != null)
                    {
                        comboBox3.DataSource = StationFactory.GetByProductLine(val.ToString());
                    }
                    else
                    {
                        List <StationEntity> stas = StationFactory.GetAll();
                        var sta1 = from ss in stas
                                   where ss.COMPANY_CODE == LoginInfo.CompanyInfo.COMPANY_CODE
                                   select ss;
                        comboBox3.DataSource = sta1.ToList <StationEntity>();
                    }
                    comboBox6.SelectedValue = DB.ReadConfigLocal("WORKSHOP_CODE");
                    comboBox6.DataSource    = WorkShopFactory.GetAll();
                    setComboxBoxCurrent(comboBox6);

                    comboBox3.SelectedValue = DB.ReadConfigLocal("STATION_CODE");
                    setComboxBoxCurrent(comboBox3);

                    comboBox4.DataSource    = ShiftFactory.GetAll();
                    comboBox4.SelectedValue = DB.ReadConfigLocal("SHIFT_CODE");
                    setComboxBoxCurrent(comboBox4);

                    comboBox5.DataSource    = TeamFactory.GetByPlineCode(val.ToString());
                    comboBox5.SelectedValue = DB.ReadConfigLocal("TEAM_CODE");
                    setComboxBoxCurrent(comboBox5);
                }
            }
            catch
            {
            }
            initing = false;
        }
Exemple #17
0
        internal UserStation(RequiredInformation requiredInfo, JToken stationData)
        {
            RequiredInfo = requiredInfo;

            AllowAddMusic        = stationData.Value <bool?>("allowAddMusic") ?? false;
            AllowDelete          = stationData.Value <bool?>("allowDelete") ?? false;
            AllowEditDescription = stationData.Value <bool?>("allowEditDescription") ?? false;
            AllowRename          = stationData.Value <bool?>("allowRename") ?? false;
            ArtUrl            = stationData.Value <string>("artUrl") ?? string.Empty;
            IsGenreStation    = stationData.Value <bool?>("isGenreStation") ?? false;
            IsQuickMix        = stationData.Value <bool?>("isQuickMix") ?? false;
            IsShared          = stationData.Value <bool?>("isShared") ?? false;
            RequiresCleanAds  = stationData.Value <bool?>("requiresCleanAds") ?? false;
            StationDetailUrl  = stationData.Value <string>("stationDetailUrl") ?? string.Empty;
            StationId         = stationData.Value <string>("stationId") ?? string.Empty;
            StationName       = stationData.Value <string>("stationName") ?? string.Empty;
            StationSharingUrl = stationData.Value <string>("stationSharingUrl") ?? string.Empty;
            StationToken      = stationData.Value <string>("stationToken") ?? string.Empty;
            SuppressVideoAds  = stationData.Value <bool?>("suppressVideoAds") ?? false;

            var dateCreated = stationData["dateCreated"];

            if (dateCreated != null)
            {
                DateCreated = Time.FromJavaTimeStamp(dateCreated.Value <double?>("time") ?? 0);
            }

            var feedbackData = stationData["feedback"];

            if (feedbackData != null)
            {
                Feedback = StationFactory.GetStationFeedback(RequiredInfo, feedbackData);
            }

            var genreData = stationData["genre"];

            if (genreData != null)
            {
                Genre = from genre in genreData select genre.ToString();
            }

            var musicData = stationData["music"];

            if (musicData != null)
            {
                Music = StationFactory.GetStationMusicInfo(musicData);
            }
        }
Exemple #18
0
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (initing)
            {
                return;
            }
            string plinermesid = comboBox2.SelectedValue.ToString();

            DB.WriteConfigLocal("PRODUCTLINE_CODE", plinermesid);
            List <StationEntity> stations = StationFactory.GetAll();
            var ss = from s in stations
                     where s.PLINE_CODE == plinermesid && s.COMPANY_CODE == comboBox1.SelectedValue.ToString()
                     select s;

            comboBox3.DataSource = ss.ToList <StationEntity>();
            List <TeamEntity> teams = TeamFactory.GetByPlineCode(plinermesid);

            comboBox5.DataSource = teams;
        }
Exemple #19
0
 public void GetByPlanStatonDcecLQ(string CompanyCode, string PlanCode, string PlineCode, string StationCode, string Sn, string fdjxl, string so, string stationcode1, ProductInfoEntity productnew)
 {
     try
     {
         //大线生成计划对应的站点bom是根据当前登录的站点StationCode,返修点是根据选择的站点,这两个变量统一,但生成snbomtemp时,返修点要根据返修站点当前登录站点生成
         //调用存储过程 获取替换后的站点BOM 插入data_sn_bom_temp和rstbomqd、rstbomts
         StationEntity ent_st       = StationFactory.GetBySTATIONCODE(StationCode);
         string        station_name = ent_st.STATION_NAME;
         ProductDataFactory.PL_QUERY_BOMZJTS(so, StationCode, PlineCode, fdjxl, PlanCode, Sn);
         ProductDataFactory.PL_UPDATE_BOMZJTS(so, StationCode, PlanCode, PlineCode, Sn);
         ProductDataFactory.PL_UPDATE_BOMLSHTS(Sn, StationCode);
         ProductDataFactory.PL_UPDATE_BOMSOTHTS(so, PlanCode, StationCode, Sn, LoginInfo.UserInfo.USER_CODE, stationcode1);
         ProductDataFactory.PL_UPDATE_BOMSOTHTS_BOMLQ(productnew.PLAN_SO, productnew.PLAN_CODE, StationCode, Sn, LoginInfo.UserInfo.USER_CODE, stationcode1, PlineCode);
     }
     catch (Exception e1)
     {
         return;
     }
 }
Exemple #20
0
        public ctrlBomItemMng(string pPlanCode, string pSn, List <SNBomTempEntity> pDS)
        {
            InitializeComponent();
            stationCode = LoginInfo.StationInfo.RMES_ID;
            plineCode   = LoginInfo.ProductLineInfo.RMES_ID;
            companyCode = LoginInfo.CompanyInfo.COMPANY_CODE;
            SN          = pDS.First().SN;

            StationEntity ent1 = StationFactory.GetByKey(stationCode);

            WorkunitCode = "";
            LineSideStoreEntity ent2 = LinesideStoreFactory.GetByWKUnit(companyCode, WorkunitCode);

            LinesideStock = ent2.STORE_CODE;

            dgvBom.AutoGenerateColumns = false;
            dgvBom.RowHeadersVisible   = false;

            dgvBom.DataSource = pDS;
        }
Exemple #21
0
        /// <summary>
        ///
        /// </summary>
        private void BindChannelOrStation(TreeNode selected)
        {
            if (IsChannelTreeNode(selected))
            {
                int          channelID = GetSelectedID(selected);
                ChannelClass c         = ChannelFactory.CreateChannel(channelID);
                this.UCChannel1.Bind(c);

                this.UCChannel1.Visible = true;
                this.UCStation1.Visible = false;
            }
            else
            {
                int          stationID = GetSelectedID(selected);
                StationClass s         = StationFactory.CreateStationByStationID(stationID);
                this.UCStation1.Bind(s);

                this.UCChannel1.Visible = false;
                this.UCStation1.Visible = true;
            }
        }
Exemple #22
0
        public void BindData()
        {
            List <DepartmentEntity> dept = DB.GetInstance().Fetch <DepartmentEntity>("");

            com_DEPT.DataSource = dept;
            com_DEPT.ValueField = "DEPT_CODE";
            com_DEPT.TextField  = "DEPT_NAME";
            com_DEPT.DataBind();
            if (com_DEPT.SelectedItem == null)
            {
                return;
            }
            string _dept = com_DEPT.SelectedItem.Value.ToString();
            List <ProductLineEntity> plines = DB.GetInstance().Fetch <ProductLineEntity>("where pline_code in (select pline_code from REL_DEPT_PLINE where dept_code=@0)", _dept);

            ASPxComboBox1.DataSource = plines;
            ASPxComboBox1.TextField  = "PLINE_NAME";
            ASPxComboBox1.ValueField = "PLINE_CODE";
            ASPxComboBox1.DataBind();
            if (ASPxComboBox1.SelectedItem == null)
            {
                return;
            }
            string pline = ASPxComboBox1.SelectedItem.Value.ToString();
            List <StationEntity> stations = StationFactory.GetByProductLine(pline);

            ASPxComboBox2.DataSource = stations;
            ASPxComboBox2.TextField  = "STATION_NAME";
            ASPxComboBox2.ValueField = "WORKUNIT_CODE";
            ASPxComboBox2.DataBind();
            string workunit = "";

            if (ASPxComboBox2.SelectedItem != null)
            {
                workunit = ASPxComboBox2.SelectedItem.Value.ToString();
            }
            Report_Exp2200 report = new Report_Exp2200(ASPxComboBox1.SelectedItem.Value.ToString(), workunit, ASPxDateEdit1.Date, ASPxDateEdit2.Date);

            ReportViewer1.Report = report;
        }
    private void Start()
    {
        if (Station == null)
        {
            Station = StationFactory.getInstance().CreateStation(stationType);
        }

        shieldRegenerator      = GetComponent <ShieldRegenerator>();
        turretManager          = GetComponent <TurretManager>();
        Station.combatStats.HP = (int)(Station.combatStats.MaxHP * constructionProgress) / 100;

        if (constructionProgress >= 100)
        {
            Constructed = true;
            EnableShieldRegeneration(true);
        }
        else
        {
            Constructed = false;
            Station.combatStats.Shields = 0;
        }
    }
Exemple #24
0
        protected void ASPxGridView1_HtmlEditFormCreated(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewEditFormEventArgs e)
        {
            ASPxComboBox pline      = ASPxGridView1.FindEditFormTemplateControl("combPline") as ASPxComboBox;
            ASPxComboBox workUnit   = ASPxGridView1.FindEditFormTemplateControl("comWorkUnit") as ASPxComboBox;
            ASPxComboBox detectItem = ASPxGridView1.FindEditFormTemplateControl("comDetectItem") as ASPxComboBox;

            pline.TextField  = "PLINE_NAME";
            pline.ValueField = "PLINE_CODE";

            string plineCode    = ASPxGridView1.GetRowValues(ASPxGridView1.FocusedRowIndex, "PLINE_CODE").ToString();
            string workUnitCode = ASPxGridView1.GetRowValues(ASPxGridView1.FocusedRowIndex, "WORKUNIT_CODE").ToString();


            List <StationEntity> stations = StationFactory.GetByProductLine(plineCode);

            workUnit.DataSource = stations;
            workUnit.TextField  = "STATION_NAME";
            workUnit.ValueField = "WORKUNIT_CODE";



            List <DetectDataEntity> detectItems = DetectDataFactory.GetByWorkunit(theCompanyCode, workUnitCode);

            detectItem.DataSource = detectItems;
            detectItem.TextField  = "DETECT_ITEM_NAME";
            detectItem.ValueField = "DETECT_ITEM_CODE";



            if (ASPxGridView1.IsEditing)
            {
                //string _workUnit = ASPxGridView1.GetRowValues(ASPxGridView1.EditingRowVisibleIndex, "WORKUNIT_CODE").ToString();
                //for (int i = 0; i < workUnit.Items.Count; i++)
                //{
                //    if (_workUnit == workUnit.Items[i].Value.ToString())
                //        workUnit.Items[i].Selected = true;
                //}
            }
        }
Exemple #25
0
        public List <SNProcessTempEntity> GetProcessList(string CompanyCode, string PlineCode, string StationCode, string PlanCode, string SN)
        {
            //查看是否已经初始化工序临时表,如果没有进行初始化
            string workunit_code = "", SQL = "";

            string UserID = LoginInfo.UserInfo.USER_ID;

            db.Execute("call PL_INIT_PROCESS_TEMP(@0,@1,@2,@3,@4,@5)", CompanyCode, PlineCode, StationCode, PlanCode, SN, UserID);

            StationEntity ent_station = StationFactory.GetByKey(StationCode);

            //if (ent_station != null) workunit_code = ent_station.WORKUNIT_CODE;
            if (ent_station != null)
            {
                workunit_code = "";
            }
            SQL = "where plan_code='" + PlanCode + "' and workunit_code='" + workunit_code + "'";
            if (!string.IsNullOrWhiteSpace(SN))
            {
                SQL += " and sn='" + SN + "'";
            }
            SQL += " order by PROCESS_CODE";
            return(db.Fetch <SNProcessTempEntity>(SQL));
        }
Exemple #26
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private bool DistributeQueryStringParam_Real()
        {
            string[] paramNames = new string[] { QueryStringNames.StationID };
            Type[]   paramTypes = new Type[] { typeof(int) };

            object [] result;
            bool      b = QueryStringParamPicker.Pick(this.Request.QueryString, paramNames, paramTypes,
                                                      out result);

            if (b)
            {
                int stationid = (int)result[0];
                this.UCConditionDTTwo1.WaterUser = SessionManager.LoginSession.WaterUser;

                StationClass      sc       = StationFactory.CreateStationByStationID(stationid);
                StationCollection stations = new StationCollection();
                stations.Add(sc);
                this.UCConditionDTTwo1.Stations = stations;
                this.UCConditionDTTwo1.Begin    = DateTime.Now.Date;
                this.UCConditionDTTwo1.End      = DateTime.Now.Date + TimeSpan.FromDays(1d);
                return(true);
            }
            return(false);
        }
Exemple #27
0
        void ctrQualityCheck_RMesDataChanged(object obj, Rmes.WinForm.Base.RMESEventArgs e)
        {
            string        stationID = LoginInfo.StationInfo.RMES_ID;
            RMESEventArgs arg       = new RMESEventArgs();

            arg.MessageHead = "";
            arg.MessageBody = "";
            if (e.MessageHead == null)
            {
                return;
            }
            //if (e.MessageHead == "WORK" || e.MessageHead=="MESLL")
            //    this.Visible = false;
            //else if (e.MessageHead == "QUA")
            //    this.Visible = true;
            //else
            if (e.MessageHead.ToString() == "SN")
            {
                SN = e.MessageBody.ToString();
                ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, SN);
                if (product == null)
                {
                    return;
                }
                PlanCode = product.PLAN_CODE;
                PlanSo   = product.PLAN_SO;
                Fdjxl    = product.PRODUCT_SERIES;
                Gylx     = product.ROUNTING_REMARK;
                //this.GridQuality.DataSource = SNDetectTempFactory.GetBySNStation(SN, StationCode);
                //StationEntity station = StationFactory.GetByKey(StationID);
                //List<SNDetectTempEntity> temp = SNDetectTempFactory.GetBySNStation(SN, StationID);
                //foreach (var t in temp)
                //{

                //    int i=GridQuality.Rows.Add();
                //    GridQuality.Rows[i].Cells["colRmesID"].Value = t.RMES_ID;
                //    GridQuality.Rows[i].Cells["colDetectCode"].Value = t.DETECT_ITEM_CODE;
                //    GridQuality.Rows[i].Cells["colDetectDesc"].Value = t.DETECT_ITEM_DESC;
                //    GridQuality.Rows[i].Cells["colQuanVal"].Value = t.DETECT_QUAN_VALUE;
                //    //GridQuality.Rows[i].Cells["colDetectRequire"].Value = t.QUAN_VALUE_REQUIRE;
                //    //GridQuality.Rows[i].Cells["colImage"].Value = t.IMAGE_FILE;
                //    GridQuality.Rows[i].Cells["colRemark"].Value = t.REMARK;
                //    GridQuality.Rows[i].Cells["colDataUp"].Value = t.MAX_VALUE;
                //    GridQuality.Rows[i].Cells["colDataDown"].Value = t.MIN_VALUE;
                //    GridQuality.Rows[i].Cells["colDetectFlag"].Value = t.DETECT_FLAG;
                //    ////DataGridViewComboBoxCell c = (DataGridViewComboBoxCell)(GridQuality.Rows[i].Cells["colFaultCode"]);
                //    ////List<DetectErrorItemEntity> errors = DetectErrorItemFactory.GetByDetectItemCode(station.WORKUNIT_CODE,t.DETECT_ITEM_CODE);
                //    ////c.DataSource = errors;
                //    ////c.DisplayMember = "ERROR_ITEM_NAME";
                //    ////c.ValueMember = "RMES_ID";

                //}
                //if (GridQuality.Rows.Count > 0)
                //{
                //    RMESEventArgs args = new RMESEventArgs();
                //    args.MessageHead = "QUACTRL";
                //    args.MessageBody = "";
                //    SendDataChangeMessage(args);
                //    ShowQualityList();
                //}
            }
            else if (e.MessageHead.ToString() == "PLAN")
            {
                //PlanCode = e.MessageBody.ToString();
                //SNDetectTempFactory.InitQualitDetectList(CompanyCode, PlineID, StationID, PlanCode, SN, UserID);
                ////this.GridQuality.DataSource = SNDetectTempFactory.GetBySNStation(SN, StationID);
                //StationEntity station = StationFactory.GetByKey(StationID);
                //List<SNDetectTempEntity> temp = SNDetectTempFactory.GetBySNStation(SN, StationID);
                //foreach (var t in temp)
                //{

                //    int i = GridQuality.Rows.Add();
                //    GridQuality.Rows[i].Cells["colRmesID"].Value = t.RMES_ID;
                //    GridQuality.Rows[i].Cells["colDetectCode"].Value = t.DETECT_ITEM_CODE;
                //    GridQuality.Rows[i].Cells["colDetectDesc"].Value = t.DETECT_ITEM_DESC;
                //    GridQuality.Rows[i].Cells["colQuanVal"].Value = t.DETECT_QUAN_VALUE;
                //    //GridQuality.Rows[i].Cells["colDetectRequire"].Value = t.QUAN_VALUE_REQUIRE;
                //    //GridQuality.Rows[i].Cells["colImage"].Value = t.IMAGE_FILE;
                //    GridQuality.Rows[i].Cells["colRemark"].Value = t.REMARK;
                //    GridQuality.Rows[i].Cells["colDataUp"].Value = t.MAX_VALUE;
                //    GridQuality.Rows[i].Cells["colDataDown"].Value = t.MIN_VALUE;
                //    GridQuality.Rows[i].Cells["colDetectFlag"].Value = t.DETECT_FLAG;
                //    //DataGridViewComboBoxCell c = (DataGridViewComboBoxCell)(GridQuality.Rows[i].Cells["colFaultCode"]);
                //    //List<DetectErrorItemEntity> errors = DetectErrorItemFactory.GetByDetectItemCode(station.WORKUNIT_CODE, t.DETECT_ITEM_CODE);
                //    //c.DataSource = errors;
                //    //c.DisplayMember = "ERROR_ITEM_NAME";
                //    //c.ValueMember = "RMES_ID";

                //}
                //if (GridQuality.Rows.Count > 0)
                //{
                //    RMESEventArgs args = new RMESEventArgs();
                //    args.MessageHead = "QUACTRL";
                //    args.MessageBody = "";
                //    SendDataChangeMessage(args);
                //    ShowQualityList();
                //}
            }
            else if (e.MessageHead.ToString() == "FOCUSDETECT")
            {
                //指定站点先防错 后采集数据
                if (GridQuality.Rows.Count > 0)
                {
                    if (StationName == "Z100" || StationName == "Z110" || StationName == "Z120")
                    {
                        GetFocus(0);
                    }
                }
            }
            else if (e.MessageHead == "SCP" || e.MessageHead == "OFFLINE")//下线处理data_sn_detect
            {
                //this.GridQuality.DataSource = null;
                //ProductDataFactory.QualityControlComplete(CompanyCode, PlineCode, StationCode, PlanCode, SN);
            }
            else if (e.MessageHead == "SHOWDETECT")
            {
                SN = e.MessageBody.ToString();
                ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, SN);
                if (product == null)
                {
                    return;
                }
                PlanCode       = product.PLAN_CODE;
                PlanSo         = product.PLAN_SO;
                Fdjxl          = product.PRODUCT_SERIES;
                Gylx           = product.ROUNTING_REMARK;
                stationcode_fx = StationCode;
                stationname_fx = StationName;
                //check中 显示BOM信息和检测数据
                SNDetectTempFactory.InitQualitDetectList(CompanyCode, PlineID, StationID, PlanCode, SN, UserCode, StationID);
                string    sql = "select * from data_sn_detect_data_TEMP where station_code='" + StationCode + "' and sn='" + SN + "' and plan_code='" + PlanCode + "' and detect_name!='LJTM' order by location_code,detect_seq ";
                DataTable dt  = dataConn.GetTable(sql);
                if (dt.Rows.Count > 0)
                {
                    DataRow dr = dt.NewRow();
                    dt.Rows.Add(dr);
                }
                this.GridQuality.DataSource = dt;
                ShowQualityList();
                if (GridQuality.Rows.Count > 0)
                {
                    PlanSnFactory.InitStationControl(CompanyCode, PlineID, StationID, product.PLAN_CODE, product.SN, "Rmes.WinForm.Controls.ctrlQualityDetect");
                    if (StationName == "Z100" || StationName == "Z110" || StationName == "Z120")
                    {
                        //指定站点先防错后采集数据
                    }
                    else
                    {
                        GetFocus(0);
                    }
                }
                else
                {
                    arg.MessageHead = "INIT";
                    arg.MessageBody = "";
                    SendDataChangeMessage(arg);
                }
                SendBomConfirm2SN();
            }
            else if (e.MessageHead == "SHOWDETECTFX1")
            {
                SN = e.MessageBody.ToString();
                ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, SN);
                if (product == null)
                {
                    return;
                }
                PlanCode       = product.PLAN_CODE;
                PlanSo         = product.PLAN_SO;
                Fdjxl          = product.PRODUCT_SERIES;
                Gylx           = product.ROUNTING_REMARK;
                stationcode_fx = StationCode;
                stationname_fx = StationName;
                //check中 显示BOM信息和检测数据
                //返修站点无需在往temp表中更新数据,在返修发动机上线时已经获取了历史记录,20161106
                //如果需要实时检测数据,则要对检测数据进行删除和新增,在选择对应站点是进行处理
                //SNDetectTempFactory.InitQualitDetectList(CompanyCode, PlineID, StationID, PlanCode, SN, UserCode, StationID);
                string    sql = "select * from data_sn_detect_data_TEMP where sn='" + SN + "' and plan_code='" + PlanCode + "' and detect_name!='LJTM' order by location_code,detect_seq ";
                DataTable dt  = dataConn.GetTable(sql);

                if (dt.Rows.Count > 0)
                {
                    DataRow dr = dt.NewRow();
                    dt.Rows.Add(dr);
                }

                this.GridQuality.DataSource = dt;
                ShowQualityList();
                if (GridQuality.Rows.Count > 0)
                {
                    //PlanSnFactory.InitStationControl(CompanyCode, PlineID, StationID, product.PLAN_CODE, product.SN, "Rmes.WinForm.Controls.ctrlQualityDetect");
                    if (StationName == "Z100" || StationName == "Z110" || StationName == "Z120")
                    {
                        //指定站点先防错后采集数据
                    }
                    else
                    {
                        GetFocus(0);
                    }
                }
                else
                {
                    arg.MessageHead = "INIT";
                    arg.MessageBody = "";
                    SendDataChangeMessage(arg);
                }
                //SendBomConfirm2SN();
            }
            else if (e.MessageHead == "SHOWDETECT_FX")
            {
                try
                {
                    //SN = e.MessageBody.ToString();
                    string   item_info = e.MessageBody.ToString();//消息体是sn^stationcode^stationname
                    string[] cmd_info  = item_info.Split('^');
                    SN             = cmd_info[0];
                    stationcode_fx = cmd_info[1];
                    stationname_fx = cmd_info[2];
                    StationEntity ent_st      = StationFactory.GetBySTATIONCODE(stationcode_fx);
                    string        station_id1 = ent_st.RMES_ID;

                    ProductInfoEntity product = ProductInfoFactory.GetByCompanyCodeSNSingle(LoginInfo.CompanyInfo.COMPANY_CODE, SN);
                    if (product == null)
                    {
                        return;
                    }
                    PlanCode = product.PLAN_CODE;
                    PlanSo   = product.PLAN_SO;
                    Fdjxl    = product.PRODUCT_SERIES;
                    Gylx     = product.ROUNTING_REMARK;
                    //check中 显示BOM信息和检测数据
                    SNDetectTempFactory.InitQualitDetectList(CompanyCode, PlineID, station_id1, PlanCode, SN, UserCode, StationID);
                    string    sql = "select * from data_sn_detect_data_TEMP where station_code='" + stationcode_fx + "' and sn='" + SN + "' and plan_code='" + PlanCode + "' and detect_name!='LJTM' order by location_code,detect_seq ";
                    DataTable dt  = dataConn.GetTable(sql);

                    if (dt.Rows.Count > 0)
                    {
                        DataRow dr = dt.NewRow();
                        dt.Rows.Add(dr);
                    }

                    this.GridQuality.DataSource = dt;
                    ShowQualityList();
                    if (GridQuality.Rows.Count > 0)
                    {
                        GetFocus(0);
                    }
                    else
                    {
                        arg.MessageHead = "INIT";
                        arg.MessageBody = "";
                        SendDataChangeMessage(arg);
                    }
                    SendBomConfirm2SN();
                }
                catch
                { }
            }
        }
Exemple #28
0
 internal StationService(string apiKey, string apiBaseUrl, int metarTafCacheTimeInMinutes, int stationCacheTimeInMinutes, string acceptHeader)
 {
     _jsonStationService = new RawStationService(apiKey, apiBaseUrl, metarTafCacheTimeInMinutes, stationCacheTimeInMinutes, acceptHeader);
     _stationFactory     = new StationFactory();
 }
    private void OnSelectionChange(List <GameObject> selectedGOs)
    {
        foreach (Transform child in constructionSection.transform)
        {
            GameObject.Destroy(child.gameObject);
        }

        if (selectedGOs.Count == 1)
        {
            ShipConstructor constructor = selectedGOs[0].GetComponent <ShipConstructor>();

            if (constructor != null)
            {
                List <ShipConstruction> shipConstructions = constructor.ShipConstructions;
                int size = shipConstructions.Count;

                for (int i = 0; i < size; i++)
                {
                    Ship  ship            = ShipFactory.getInstance().CreateShip(shipConstructions[i].shipType);
                    float buttonPositionX = (constructionButtonPrefabOriginalPosX - 10) + (constructionButtonPrefabWidth * i) + 10; //10 It's the offset between buttons

                    GameObject button = Instantiate(constructionButtonPrefab, constructionSection.transform);

                    RectTransform rectTransform = button.GetComponent <RectTransform>();

                    rectTransform.anchoredPosition3D = new Vector3(buttonPositionX, rectTransform.localPosition.y, rectTransform.localPosition.z);

                    //Debug.Log("( " + constructionButtonPrefabOriginalPosX + "- 10 )" + " + " + "( " + constructionButtonPrefabWidth + " * " + i + ") + 10 = " + buttonPositionX);

                    button.GetComponentInChildren <RawImage>().texture = ship.shipIcon;
                    button.SetActive(true);

                    SetShipConstructionButtonClickCallback(constructor, button, shipConstructions[i]);
                }
            }
            else
            {
                StationConstructor stationConstructor = selectedGOs[0].GetComponent <StationConstructor>();
                if (stationConstructor != null)
                {
                    List <StationConstruction> stationConstructions = stationConstructor.stationConstructions;
                    int size = stationConstructions.Count;
                    for (int i = 0; i < size; i++)
                    {
                        Station station         = StationFactory.getInstance().CreateStation(stationConstructions[i].stationType);
                        float   buttonPositionX = (constructionButtonPrefabOriginalPosX - 10) + (constructionButtonPrefabWidth * i) + 10; //10 It's the offset between buttons

                        GameObject button = Instantiate(constructionButtonPrefab, constructionSection.transform);

                        RectTransform rectTransform = button.GetComponent <RectTransform>();

                        rectTransform.anchoredPosition3D = new Vector3(buttonPositionX, rectTransform.localPosition.y, rectTransform.localPosition.z);

                        //Debug.Log("( " + constructionButtonPrefabOriginalPosX + "- 10 )" + " + " + "( " + constructionButtonPrefabWidth + " * " + i + ") + 10 = " + buttonPositionX);

                        button.GetComponentInChildren <RawImage>().texture = station.stationIcon;
                        button.SetActive(true);

                        //SetShipConstructionButtonClickCallback(constructor, button, stationConstructions[i]);
                        SetStationConstructionButtonClickCallback(stationConstructor, button, stationConstructions[i]);
                    }
                }
            }

            ResearchController researchController = selectedGOs[0].GetComponent <ResearchController>();

            if (researchController != null)
            {
                List <ResearchTree> researchTrees = researchController.researchTrees;
                for (int i = 0, j = 0; i < researchTrees.Count; i++)
                {
                    if (researchTrees[i].NextNode != null)
                    {
                        float buttonPositionX = (constructionButtonPrefabOriginalPosX - 10) + (constructionButtonPrefabWidth * j) + 10; //10 It's the offset between buttons

                        GameObject button = Instantiate(constructionButtonPrefab, constructionSection.transform);

                        RectTransform rectTransform = button.GetComponent <RectTransform>();

                        float yPosition = rectTransform.position.y - 550;
                        rectTransform.anchoredPosition3D = new Vector3(buttonPositionX, yPosition, rectTransform.localPosition.z);

                        //Debug.Log("( " + constructionButtonPrefabOriginalPosX + "- 10 )" + " + " + "( " + constructionButtonPrefabWidth + " * " + i + ") + 10 = " + buttonPositionX);

                        button.GetComponentInChildren <RawImage>().texture = researchTrees[i].NextNode.research.texture;
                        button.SetActive(true);

                        //SetShipConstructionButtonClickCallback(constructor, button, stationConstructions[i]);
                        SetResearchButtonCallback(researchController, researchTrees[i], button);
                        j++;
                    }
                }
            }
        }
    }
Exemple #30
0
        private void txtStation_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar.ToString().Equals("\r"))
            {
                try
                {
                    if (txtStation.Text == "")
                    {
                        txtStation.Focus(); return;
                    }

                    string station = txtStation.Text.Trim().ToUpper();
                    switch (station)
                    {
                    case "QUIT":
                        Process.Start("shutdown.exe", "-s -t 10");
                        break;

                    case "EXIT":
                        this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
                        this.Close();
                        break;

                    case "CANC":
                        txtBc.Focus();
                        txtBz.Text = "";
                        break;

                    default:
                        break;
                    }

                    DB.WriteConfigLocal("STATION_NAME", station);
                    LoginInfo.StationInfo   = StationFactory.GetBySTATIONNAME(station);
                    txtStation.Text         = "";
                    txtStation.PasswordChar = new char();
                    txtStation.Text         = LoginInfo.StationInfo.STATION_NAME;

                    if (txtBc.Text.Trim() == "" || txtBz.Text.Trim() == "" || txtUser.Text.Trim() == "" || txtStation.Text.Trim() == "")
                    {
                        return;
                    }
                    if (LoginInfo.StationInfo.STATION_TYPE != "ST05" && LoginInfo.TeamInfo.TEAM_NAME.Contains("修理班"))//非返修站点 但是返修班组 则认为顶岗扫描
                    {
                        CsGlobalClass.DGSM = true;
                    }
                    LoginInfo.ProductLineInfo = ProductLineFactory.GetByStationCode(LoginInfo.StationInfo.STATION_CODE);
                    string companycode  = LoginInfo.CompanyInfo.COMPANY_CODE;
                    string workshopcode = "";
                    string usercode     = LoginInfo.UserInfo.USER_CODE;
                    string plinecode    = LoginInfo.ProductLineInfo.RMES_ID;
                    string stationcode  = LoginInfo.StationInfo.STATION_CODE;
                    string shiftcode    = LoginInfo.ShiftInfo.SHIFT_CODE;
                    string groupcode    = LoginInfo.TeamInfo.TEAM_CODE;
                    string othercode    = "";
                    //string ip = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList.GetValue(0).ToString();
                    string ip      = GetLocalIP();
                    bool   logined = UserFactory.GetByFormAuth(usercode, "",
                                                               companycode, workshopcode, plinecode, stationcode, shiftcode, groupcode, othercode, ip, DB.GetServerTime().ToString());
                    if (logined)
                    {
                        this.DialogResult = System.Windows.Forms.DialogResult.OK;
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(Rmes.Public.ErrorHandle.EH.LASTMSG, "验证失败!");
                    }
                }
                catch
                {
                    txtStation.Text            = "";
                    txtStation.SelectionStart  = 0;
                    txtStation.SelectionLength = txtBc.Text.Length;
                    txtStation.Focus();
                }
            }
        }