zongzhibin
2024-11-22 3c1646a85f085cb0dd8dd386cdcdcd5a221adc4d
CC/iWareCC_ASRS/FormCC.cs
@@ -12,6 +12,7 @@
using iWareModel.Entity.AGV;
using iWareSql.DataAccess;
using iWareSql.DBModel;
using iWareSql.WmsDBModel;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -300,7 +301,7 @@
            }
            else
            {//正式模式 
                rgvServiceClient = new RgvServiceClient();
                stationServiceClient = new StationServiceClient();
            }
            this.lbl_IsSimulationPLC.BackColor = IsSimulationPLC ? Color.Red : Color.Green;
@@ -1715,7 +1716,7 @@
            DialogResult dr = MessageBox.Show("确定要启动【" + currentCheckModelText + "】模式吗?", "启动模式", messButton);
            if (dr == DialogResult.OK)//如果点击“确定”按钮
            {
                using (DbModel edm = new DbModel())
                using (WmsDBModel edm = new WmsDBModel())
                {
                    var ccSystem = BasicDataSetHandler.GetCCSystem(edm);
                    if (ccSystem == null)
@@ -1774,7 +1775,7 @@
        /// <returns></returns>
        private bool CommonStopService()
        {
            using (DbModel edm = new DbModel())
            using (WmsDBModel edm = new WmsDBModel())
            {
                var ccSystem = BasicDataSetHandler.GetCCSystem(edm);
                if (ccSystem == null)
@@ -1790,7 +1791,7 @@
                    ccSystem.Machine = string.Empty;
                    ccSystem.LastMachine = Dns.GetHostName();
                    ccSystem.LastUnLineTime = DateTime.Now;
                    ccSystem.ModifyTime = DateTime.Now;
                    ccSystem.UpdateTime = DateTime.Now;
                    int i = edm.SaveChanges();
                    if (i <= 0)