using bizFacade;
using System;
//using SystemFramework;

namespace MesServerFunctions
{
    partial class FunctionMES
    {
        /// <summary>
        /// 工件到位与离开时，清空MES自身信号
        /// </summary>
        /// <param name="OpName"></param>
        /// <param name="tagValue"></param>
        private void WorkStartOutSide(object  e)
        {
            try
            {
                DoWhatPlc.CustomeEvetnArgs msgEvent = (DoWhatPlc.CustomeEvetnArgs)e;
                string OpName = Convert.ToString(msgEvent.OpName);
                int tagValue = Convert.ToInt32(msgEvent.TagValue);
                if (tagValue > 0)
                {
                    BaseDataSystemMES.OpName_MIS_MOBY_Insert(OpName, MobyTagType.WorkStartOutSideIn, DateTime.Now.ToString());
                }
                else
                {
                    BaseDataSystemMES.OpName_MIS_MOBY_Insert(OpName, MobyTagType.WorkStartOutSideOut, DateTime.Now.ToString());
                }
            }
            catch (Exception err)
            {
                ////ApplicationLog.WriteLog(err, "Function02:WorkStart");
            }
        }

    }
}
