LogicHandler.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using UAS_LabelMachine.Entity;
  2. namespace UAS_LabelMachine.PublicMethod
  3. {
  4. class LogicHandler
  5. {
  6. public static DataHelper dh = SystemInf.dh;
  7. public static void FilterData(string iCustCode, string iBrand, string iSpec, string iQty, string iDateCode, string iLotno, out string oSpec, out string oQty, out string oDatecode, out string oLotno)
  8. {
  9. oSpec = "";
  10. oQty = "";
  11. oDatecode = "";
  12. oLotno = "";
  13. string[] param = new string[] { iCustCode, iBrand, iSpec, iQty, iDateCode, iLotno, oSpec, oQty, oDatecode, oLotno };
  14. dh.CallProcedure("sp_datafilter", ref param);
  15. oSpec = param[6];
  16. oQty = param[7];
  17. oDatecode = param[8];
  18. oLotno = param[9];
  19. }
  20. public static void GetTimeFromDatecode(string iDatecode, string iCustcode, out string oYear, out string oMonth, out string oDay, out string oDate)
  21. {
  22. oYear = "0";
  23. oMonth = "0";
  24. oDay = "0";
  25. oDate = "19000101";
  26. string[] param = new string[] { iDatecode, iCustcode, oYear, oMonth, oDay, oDate };
  27. dh.CallProcedure("GETTIMEFROMDATECODE", ref param);
  28. oYear = param[2];
  29. oMonth = param[3];
  30. oDay = param[4];
  31. oDate = param[5];
  32. }
  33. public static void CustBarCode(string iInoutno,out string oSQL)
  34. {
  35. oSQL = "";
  36. string[] param = new string[] { iInoutno, oSQL };
  37. dh.CallProcedure("SP_CUSTBARCODE", ref param);
  38. oSQL = param[1];
  39. }
  40. }
  41. }