private bool POS_Open(IskraPOS pos) { bool isOpenECR = IskraPOS.IsOpenECR; if (this.TestMode) { pos.SetDebugMode(); } if (!pos.Open(this.m_Operator.Name)) { this.m_Error = pos.GetErrorMessage(); return false; } string textInHeader = this.m_OperatorOrgParent.LongName + " " + this.m_OperatorOrgParent.AddrName; if (textInHeader.get_Length() > pos.MaxLenLine) { textInHeader = this.m_OperatorOrgParent.LongName + System.Environment.get_NewLine() + this.m_OperatorOrgParent.AddrName; } textInHeader = string.Concat((string[]) new string[] { System.Environment.get_NewLine(), " ", System.Environment.get_NewLine(), "Пункт приема ", this.m_OperatorOrg.AddrName, System.Environment.get_NewLine(), textInHeader, System.Environment.get_NewLine(), this.m_OperatorOrgParent.Info }); if (this.m_CashierCheckHeader == null) { this.m_CashierCheckHeader = Settings.Default.CashierCheckHeader; } bool flag2 = (bool) (this.m_CashierCheckHeader != textInHeader); if (pos.IsShiftOpen() && flag2) { this.m_Error = "Необходимо закрыть смену."; throw new System.ApplicationException("Данные заголовка изменились, для обновления необходимо закрыть смену."); } if (!isOpenECR || flag2) { pos.Initialize(textInHeader, null); this.m_Error = pos.GetErrorMessage(); if (this.m_Error != null) { return false; } if (flag2) { Settings.Default.CashierCheckHeader = this.m_CashierCheckHeader = textInHeader; } } return true; }
public bool Close() { int num = AzimuthWrapper.CloseDLL(); if (num != 0) { this.LastErrorMessage = num; } else { CurrentIskraPOS = null; } return (bool) (num == 0); }
private void POS_Close(IskraPOS pos) { pos.Close(); this.m_Error = pos.GetErrorMessage(); }
public bool Open(string OperName) { if (IsOpenECR) { if (OperName != this.OperatorName) { return this.ChangeOpName(OperName); } return true; } this.Serial = null; if ((!this.OpenDev(OperName, "COM1") && !this.OpenDev(OperName, "COM2")) && (!this.OpenDev(OperName, "COM3") && !this.OpenDev(OperName, "COM4"))) { CurrentIskraPOS = null; return false; } CurrentIskraPOS = this; return true; }