public String GetProductID(String SerialNumber, String TestKind) { if ((this.Env.Employee.strEmployeeNumber == null) || (this.Env.Employee.strEmployeeNumber == "nullEmpNumber")) { this.EmployeeVerification(this.Emp.strEmployeeNumber); } if (TestKind == "Adjustement") { TestKind = "Adjustment"; } if (TestKind == "FAI") { TestKind = "OBA"; this.actualFixtureID = "FAI"; } try { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, TestKind, "", this.Env, false, false, this.Mode, "", ""); return(this.Authorization.strItem); } catch { return(""); } }
private void Authorization(string SerialNumber, string TestKind, string Status, bool English) { clAuthorization authorization = new clAuthorization(); auth = authorization.TryAuthorization(SerialNumber, TestKind, Status, env, English); if (auth == null) { auth = new clAuthorization(); } }
public Boolean SetActualResult(String Result, String XmlReportString, String SerialNumber) { Boolean retVal = false; if (SerialNumber.Length == 17) { SerialNumber = SerialNumber.Substring(8); } if (SerialNumber.Length == 19) { SerialNumber = SerialNumber.Substring(10); } if ((this.Env.Employee.strEmployeeNumber == null) || (this.Env.Employee.strEmployeeNumber == "nullEmpNumber")) { this.EmployeeVerification(this.Emp.strEmployeeNumber); } try { if (this.Authorization.strWO_SerialNumber != null) { if (this.Authorization.strWO_SerialNumber != "") { this.Authorization = this.Authorization.TryAuthorization(this.Authorization.strWO_SerialNumber, this.Authorization.strTestKind, Result, this.Env, false, true, this.Mode, XmlReportString, ""); } else { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, this.Authorization.strTestKind, Result, this.Env, false, true, this.Mode, XmlReportString, ""); } } else { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, this.Authorization.strTestKind, Result, this.Env, false, true, this.Mode, XmlReportString, ""); } /* * if ((this.Authorization.strWO_SerialNumber != null)) * { * this.Authorization = this.Authorization.TryAuthorization(this.Authorization.strWO_SerialNumber, this.Authorization.strTestKind, Result, this.Env, true, false, XmlReportString); * } * else * { * retVal = false; * } */ } catch { this.WriteLogData(""); return(false); } this.WriteLogData(""); return(retVal); }
public Boolean SetActualResult(String Result, String XmlReportString, String SerialNumber) { Boolean retVal = false; if (this.Env.Employee.strEmployeeNumber == null) { this.Env.Employee = this.Emp; } try { if (this.Authorization.strWO_SerialNumber != null) { if (this.Authorization.strWO_SerialNumber != "") { this.Authorization = this.Authorization.TryAuthorization(this.Authorization.strWO_SerialNumber, this.Authorization.strTestKind, Result, this.Env, true, true, this.Mode, XmlReportString); } else { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, this.Authorization.strTestKind, Result, this.Env, true, true, this.Mode, XmlReportString); } } else { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, this.Authorization.strTestKind, Result, this.Env, true, true, this.Mode, XmlReportString); } /* * if ((this.Authorization.strWO_SerialNumber != null)) * { * this.Authorization = this.Authorization.TryAuthorization(this.Authorization.strWO_SerialNumber, this.Authorization.strTestKind, Result, this.Env, true, false, XmlReportString); * } * else * { * retVal = false; * } */ } catch { this.WriteLogData(""); return(false); } this.WriteLogData(""); return(retVal); }
public Boolean BelMESAuthorization(String SerialNumber, String TestType, String ProductName, String XmlContent, Boolean ForceTerminated) { if (TestType == "Adjustement") { TestType = "Adjustment"; } if (this.Env.Employee.strEmployeeNumber == null) { this.Env.Employee = this.Emp; } if ((this.Authorization.strWO_SerialNumber != null) && ForceTerminated) { this.Authorization = this.Authorization.TryAuthorization(this.Authorization.strWO_SerialNumber, this.Authorization.strTestKind, "Terminated", this.Env, true, false, this.Mode, XmlContent); } if ((SerialNumber.Length == 13) && (TestType != "")) { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, TestType, "", this.Env, true, true, this.Mode); this.Authorization.strTestKind = TestType; } this.WriteLogData(SerialNumber); Boolean b_Verified = true; if (this.Authorization.blnAuthorized) { if (this.Authorization.strItem != ProductName) { b_Verified = false; } } else { b_Verified = false; } return(b_Verified); }
public Boolean SetActualResult(String SerialNumber, String TestKind, String Result, String XmlReportString) { Boolean retVal = true; if (SerialNumber.Length == 17) { SerialNumber = SerialNumber.Substring(8); } if (SerialNumber.Length == 19) { SerialNumber = SerialNumber.Substring(10); } if ((this.Env.Employee.strEmployeeNumber == null) || (this.Env.Employee.strEmployeeNumber == "nullEmpNumber")) { this.EmployeeVerification(this.Emp.strEmployeeNumber); } if (TestKind == "Adjustement") { TestKind = "Adjustment"; } if (TestKind == "FAI") { TestKind = "OBA"; this.actualFixtureID = "FAI"; } try { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, TestKind, Result, this.Env, false, true, this.Mode, XmlReportString, this.actualFixtureID); if (this.Authorization.intReturnCode < 0) { MessageBox.Show(String.Concat(this.Authorization.strResult, " \rChyba v spojeni s SQL serverom. Zavolajte prosim svojho nadriadeneho"), "CHYBA", MessageBoxButtons.OK, MessageBoxIcon.Error); this.WriteLogData(this.Authorization.intReturnCode.ToString()); return(false); } if ((!this.Authorization.blnAuthorized) && (TestKind == "OBA")) { MessageBox.Show(String.Concat("Nepodaril sa vytvorit zaznam z OBA testu pre SN ", SerialNumber, " do Belmesu. Kontaktujte prosím testovacieho technika."), "CHYBA", MessageBoxButtons.OK, MessageBoxIcon.Error); this.WriteLogData("OBA Fail"); return(false); } /* * if ((this.Authorization.strWO_SerialNumber != null)) * { * this.Authorization = this.Authorization.TryAuthorization(this.Authorization.strWO_SerialNumber, this.Authorization.strTestKind, Result, this.Env, true, false, XmlReportString); * } * else * { * retVal = false; * } */ } catch { this.WriteLogData("-00000001"); return(false); } this.WriteLogData("0"); return(retVal); }
public Boolean BelMESAuthorization(String SerialNumber, String TestType, ref String ProductName, String XmlContent, Boolean ForceTerminated, Boolean StartNew, String warningInfoMessage) { if (SerialNumber.Length == 8) { this.WriteLogData(String.Concat("sn ma len 8 znakov - ", SerialNumber, " - ", warningInfoMessage)); return(false); } if (SerialNumber.Length == 17) { SerialNumber = SerialNumber.Substring(8); } if (SerialNumber.Length == 19) { SerialNumber = SerialNumber.Substring(10); } if ((this.LastSerialNumber == SerialNumber) && (this.Authorization.blnAuthorized) && (this.Authorization.blnTraceItemStart)) { return(true); } this.LastSerialNumber = SerialNumber; if (TestType == "Adjustement") { TestType = "Adjustment"; } if (TestType == "FAI") { TestType = "OBA"; this.actualFixtureID = "FAI"; } if (this.Env.Employee.strEmployeeNumber == null) { this.EmployeeVerification(this.Emp.strEmployeeNumber); } if (this.Env.Employee.strEmployeeNumber == "nullEmpNumber") { this.EmployeeVerification(this.Emp.strEmployeeNumber); } if ((this.Authorization.strWO_SerialNumber != null) && ForceTerminated) { this.Authorization = this.Authorization.TryAuthorization(this.Authorization.strWO_SerialNumber, this.Authorization.strTestKind, "Terminated", this.Env, true, false, this.Mode, XmlContent, this.actualFixtureID); if (!StartNew) { this.WriteLogData(String.Concat(SerialNumber, " - ", warningInfoMessage)); return(true); } } if (TestType != "") { this.Authorization = this.Authorization.TryAuthorization(SerialNumber, TestType, "", this.Env, false, true, this.Mode, "", this.actualFixtureID); this.Authorization.strTestKind = TestType; } if (this.Authorization.intReturnCode < 0) { MessageBox.Show(String.Concat(this.Authorization.strResult, " \rChyba v spojeni s SQL serverom. Zavolajte prosim svojho nadriadeneho"), "CHYBA", MessageBoxButtons.OK, MessageBoxIcon.Error); this.WriteLogData(String.Concat(this.Authorization.intReturnCode.ToString(), " - ", warningInfoMessage)); return(false); } this.WriteLogData(String.Concat(SerialNumber, " - ", warningInfoMessage)); Boolean b_Verified = true; if (this.Authorization.blnAuthorized) { ProductName = this.Authorization.strItem; } else { b_Verified = false; if (this.Authorization.blnMustTraced) { MessageBox.Show(this.Authorization.strResult, "CHYBA", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { ProductName = this.Authorization.strItem; b_Verified = true; } } return(b_Verified); }