Beispiel #1
0
 public void ProductionAndStationRefish()
 {
     productionDt                = null;
     productionDt                = AsmProduction_BLL.GetAllAsmProduction();
     CB_Production.DataSource    = productionDt;
     CB_Production.DisplayMember = "PRODUCTION_VR";
     CB_Production.ValueMember   = "PRODUCTION_ID";
     if (CB_Production.Items.Count > 0)
     {
         CB_Production.SelectedIndex = 0;
     }
     stationDt                = null;
     stationDt                = AsmStation_BLL.GetAllStation();
     CB_Station.DataSource    = stationDt;
     CB_Station.DisplayMember = "STATION_NAME";
     CB_Station.ValueMember   = "STATION_ID";
     CB_Station.SelectedIndex = 0;
 }
Beispiel #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            int         index = 0;
            string      stName;
            XmlNode     lineNode     = ClsCommon.InfoRootNode.SelectSingleNode("line[@name='" + lineName + "']");
            XmlNodeList stationNodes = lineNode.SelectNodes("station");///////DELETE

            foreach (XmlNode node in stationNodes)
            {
                if (int.Parse(node.Attributes["index"].Value) > index)
                {
                    index = int.Parse(node.Attributes["index"].Value);
                }
            }
            if (lstStation.Items.Count > 0)
            {
                index++;
            }
            stName = "Station" + index.ToString();
            XmlElement element = ClsCommon.xml.CreateElement("station");

            element.SetAttribute("index", index.ToString());
            element.SetAttribute("name", stName);
            element.SetAttribute("processOK", "0");
            element.SetAttribute("dataOK", "0");
            //element.SetAttribute("index", index.ToString());
            //element.SetAttribute("name", stName);
            //element.SetAttribute("scanValue", "");
            //element.SetAttribute("automaticStation", "0");
            element.SetAttribute("type", "0");
            element.SetAttribute("recipeOrNot", "1");
            element.SetAttribute("agvOrNot", "1");
            element.SetAttribute("requentMESoutLineOrNot", "0");
            element.SetAttribute("lightLighOrNot", "0");
            element.SetAttribute("requentMESInLineOrNot", "0");
            element.SetAttribute("reviewOrNot", "1");
            element.SetAttribute("printOrNot", "0");
            element.SetAttribute("dataUploadMESOrNot", "0");
            element.SetAttribute("endSTorNot", "0");
            element.SetAttribute("gunOrNot", "1");
            element.SetAttribute("autoOrNot", "0");
            element.SetAttribute("stationTime", "10000");
            //element.SetAttribute("keypartOK", "0");
            //element.SetAttribute("statusOK", "0");
            //element.SetAttribute("processOK", "0");
            // element.SetAttribute("dataOK", "0");
            //element.SetAttribute("snAddr", "");
            //element.SetAttribute("snTagAddr", "");
            //element.SetAttribute("okAddr", "");
            //element.SetAttribute("programAddr", "");
            //element.SetAttribute("enableAddr", "");
            //element.SetAttribute("enableTagAddr", "");

            lineNode.AppendChild(element);
            ClsCommon.saveXml();
            #region >>>>>同步新增站
            AsmStationObject aso = new AsmStationObject();
            aso.STATION_INDEX         = index.ToString();
            aso.STATION_NAME          = stName;
            aso.STATION_PROCESSOK     = "0";
            aso.STATION_DATAOK        = "0";
            aso.STATION_TYPE          = "0";
            aso.STATION_RECIPEORNOT   = "1";
            aso.STATION_AGVORNOT      = "1";
            aso.STATION_REQUSTOUTLINE = "1";
            aso.STATION_LIGHTORNOT    = "1";
            aso.STATION_REQUSTIN      = "1";
            aso.STATION_REVIEWORNOT   = "1";
            aso.STATION_PRINTORNOT    = "1";
            aso.STATION_UPLOADMES     = "1";
            aso.STATION_ENDORNOT      = "0";
            aso.STATION_GUNORNOT      = "1";
            aso.STATION_AUTOORNOT     = "0";
            aso.STATION_TIME          = 10000;
            AsmStation_BLL.AddStationByObject(aso);
            #endregion
            lstStation.Items.Add(stName);
            lstStation.SelectedIndex = lstStation.Items.Count - 1;

            if (lstStation.Items.Count > 0)
            {
                btnRemove.Enabled   = true;
                btnMovedown.Enabled = true;
                btnMoveup.Enabled   = true;
            }
        }
Beispiel #3
0
 public void Refish()
 {
     aso = AsmStation_BLL.GetStationByCondition(" STATION_NAME='" + StationName + "';");
 }