Beispiel #1
0
    public static string MakePickUpBill(string UserID,
                                        string RemoveNoControl,
                                        string SLP_ELocateControl,
                                        string SLP_ELocateSecControl
                                        )
    {
        bool InsertOK = false;
        string OK = "";
        string PickNos = "";
        string MapNos = "";
        try
        {

            //return "2|PK908120001,PK908120002";

            IVMModel.MaintainPickData BCO = new IVMModel.MaintainPickData(ConntionDB);

            ParameterList.Clear();
            ParameterList.Add(RemoveNoControl);
            ParameterList.Add(RemoveNoControl);
            ParameterList.Add(1);

            MapNos = BCO.CheckIsExistByMAPNo(ParameterList);

            if (MapNos != string.Empty)
            {
                return "0|移轉單" + MapNos + "已被用來產生過揀貨單";
            }
            else
            {
                //建立揀貨單
                ParameterList.Clear();
                ParameterList.Add(UserID);
                ParameterList.Add(DateTime.Now.ToString("yyyyMMddHHmmss"));
                ParameterList.Add(RemoveNoControl);
                ParameterList.Add(SLP_ELocateControl);
                ParameterList.Add(SLP_ELocateSecControl);
                InsertOK = BCO.CreateByTrans(ParameterList, null, out OK, out PickNos);

                if (OK == "0")
                {
                    return OK + "|查無符合條件的資料";
                }

                return OK + "|" + PickNos;

            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }