Exemple #1
0
        private bool proceed(int i)
        {
            //Item Number
            myItem.ItemNumber.Value = table.Rows[i]["ItemNumber"].ToString();

            //from
            myItem.StockroomFrom.Value = table.Rows[i]["StockRoomFrom"].ToString();
            myItem.BinFrom.Value       = table.Rows[i]["BinFrom"].ToString();


            myItem.InventoryCategoryFrom.Value = table.Rows[i]["InventoryCat"].ToString();

            //to

            myItem.StockroomTo.Value = table.Rows[i]["StockRoomTo"].ToString();
            myItem.BinTo.Value       = table.Rows[i]["BinTo"].ToString();

            myItem.InventoryCategoryTo.Value = table.Rows[i]["InventoryCat"].ToString();

            //QTY
            myItem.InventoryQuantity.Value = table.Rows[i]["InventoryQTY"].ToString();
            myItem.LotIdentifier.Value     = "N";

            listResult.Items.Add(myItem.GetString(TransactionStringFormat.fsCDF));
            logtxt(myItem.GetString(TransactionStringFormat.fsCDF));
            listResult.Items.Add("");
            logtxt("");



            return(ExecuteTransaction(table.Rows[i]["ItemKey"].ToString()));
        }
Exemple #2
0
        public bool AmalgammaFSTI_IMTR01(string FSTI_fields, string Ammalgamma_User)
        {
            //Transaction Object
            IMTR01 MyIMTR01 = new IMTR01();

            //IntemNumber,STK-BINFrom,InvCatFrom,STK-BINTo,InvCatTo,Qty
            string[] Fields_Array = FSTI_fields.Split(',');

            //Item Number
            MyIMTR01.ItemNumber.Value = Fields_Array[0];

            //from

            string[] LocFrom = Fields_Array[1].Split('-');
            string   BinFrom = "";

            if (LocFrom.Count() > 2)
            {
                for (int i = 1; i < LocFrom.Count(); i++)
                {
                    if (i == 1)
                    {
                        BinFrom += LocFrom[i];
                    }
                    else
                    {
                        BinFrom += "-" + LocFrom[i];
                    }
                }
            }
            else
            {
                BinFrom = LocFrom[1];
            }

            MyIMTR01.StockroomFrom.Value = LocFrom[0];
            MyIMTR01.BinFrom.Value       = BinFrom;

            MyIMTR01.InventoryCategoryFrom.Value = Fields_Array[2];

            //to

            //IntemNumber,STK-BINFrom,InvCatFrom,STK-BINTo,InvCatTo,Qty

            string[] LocTo = Fields_Array[3].Split('-');
            string   BinTo = "";

            if (LocTo.Count() > 2)
            {
                for (int i = 1; i < LocTo.Count(); i++)
                {
                    if (i == 1)
                    {
                        BinTo += LocTo[i];
                    }
                    else
                    {
                        BinTo += "-" + LocTo[i];
                    }
                }
            }
            else
            {
                BinTo = LocTo[1];
            }


            MyIMTR01.StockroomTo.Value = LocTo[0];
            MyIMTR01.BinTo.Value       = BinTo;

            MyIMTR01.InventoryCategoryTo.Value = Fields_Array[4];

            //QTY
            MyIMTR01.InventoryQuantity.Value = Fields_Array[5];
            MyIMTR01.LotIdentifier.Value     = "N";


            CDFResponse = MyIMTR01.GetString(TransactionStringFormat.fsCDF);

            if (_fstiClient.ProcessId(MyIMTR01, null))
            {
                //
                FSTI_ErrorMsg   = "";
                Trans_Error_Msg = "";

                FSTI_Log(CDFResponse, Ammalgamma_User, "ITMB03", "");

                return(true);
            }
            else
            {
                // failure, retrieve the error object
                // and then dump the information in the list box
                itemError       = null;
                itemError       = _fstiClient.TransactionError;
                Trans_Error_Msg = itemError.Description;
                // DumpErrorObject(myItem, itemError);

                FSTI_Log(CDFResponse, Ammalgamma_User, "ITMB03", Trans_Error_Msg);
                return(false);
            }
        }