예제 #1
0
        public void LastFiscalClosure(int param)
        {
            _datecsPort.SendCommand(Commands.LastFiscalClosureInfo, param > 1 || param < 0 ? "0" : param.ToString());
            List <string> tmpList = MHelper.GetStringListFromByteArray(_datecsPort.DataToHost);

            tmpList[0] = tmpList[0].Substring(1);
            PropertiesUpdate(tmpList);
            MHelper.WriteLog("LastFiscalClosure(int param). Param - " + param);
        }
예제 #2
0
        public void GetFirstArticle()
        {
            _datecsPort.SendCommand(Commands.ProgramArticles, "F");
            List <string> tmpList = MHelper.GetStringListFromByteArray(_datecsPort.DataToHost);

            if (tmpList[0].StartsWith("P") && tmpList[0].Length > 1)
            {
                tmpList[0] = tmpList[0].Replace("P", string.Empty);
                tmpList.Insert(0, "P");
            }
            PropertiesUpdate(tmpList);
            MHelper.WriteLog("GetFirstArticle()");
        }
예제 #3
0
        public void GetLastFreeArticle()
        {
            _datecsPort.SendCommand(Commands.ProgramArticles, "x");
            List <string> tmpList = MHelper.GetStringListFromByteArray(_datecsPort.DataToHost);

            if (tmpList[0].StartsWith("P") && tmpList[0].Length > 1)
            {
                tmpList[0] = tmpList[0].Replace("P", "");
                tmpList.Insert(0, "P");
            }
            PropertiesUpdate(tmpList);
            if (s1 == "F")
            {
                ErrorPropertiesUpdate("Ошибка чтения/программирования артикула", 34);
                return;
            }
            MHelper.WriteLog("GetLastFreeArticle()");
        }
예제 #4
0
        private void UpdateDataEventHandler(object sender, DataUpdatedEventArgs e)
        {
            List <string> dataList = MHelper.GetStringListFromByteArray(e.DataToHost);

            PropertiesUpdate(dataList);
        }