コード例 #1
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;
            }
        }