Esempio n. 1
0
        private void LoadChooseFromList(string id, string code, Dictionary <string, string> conditions, EditText txt)
        {
            ChooseFromList oCFLFolio = SAPChooseFromList.Init(false, code, id, this);

            if (!Object.ReferenceEquals(conditions, null) && conditions.Count > 0)
            {
                SAPChooseFromList.AddConditions(oCFLFolio, conditions);
            }
            //bind choose from list to editText
            SAPChooseFromList.Bind(id, txt);
        }
Esempio n. 2
0
        private void chkStatus_ClickAfter(object sboObject, SBOItemEventArg pVal)
        {
            try {
                var checkBox = (CheckBox)sboObject;

                //FOOD PLANT ----------------------------------------------------------------------------------------
                if (user.IsFoodPlant)
                {
                    if (!checkBox.Checked)
                    {
                        SAPChooseFromList.AddConditionValues(this.UIAPIRawForm.ChooseFromLists.Item("CFL_PO"), "DocNum", foodTransferDAO.GetCancelledOrders(user.WhsCode));
                    }
                    else
                    {
                        SAPChooseFromList.AddConditions(this.UIAPIRawForm.ChooseFromLists.Item("CFL_PO"), new Dictionary <string, string>()
                        {
                            { "Type", "S" }, { "Status", "R" }, { "Warehouse", "PLHE" }
                        });
                    }
                }
                //QUARANTINE ----------------------------------------------------------------------------------------
                else
                {
                    txtBags.Active = true;
                    //Stock Entry's
                    if (!checkBox.Checked)
                    {
                        txtFolio.Item.Enabled = true;
                        txtItem.Item.Enabled  = false;

                        if (this.UIAPIRawForm.ChooseFromLists.Count < 3)
                        {
                            LoadChooseFromList2("CFL_SE", "59", new Dictionary <string, string>()
                            {
                                { "Series", foodTransferDAO.GetSeries(user.WhsCode, "59", "Series").ToString() }, { "U_GLO_InMo", "E-PROD" }, { "U_GLO_Status", "O" }
                            }, txtFolio);
                        }
                        else
                        {
                            SAPChooseFromList.Bind("CFL_SE", txtFolio);
                        }
                        txtFolio.Active        = true;
                        btnCreate.Item.Enabled = false;
                    }
                    //Material List's
                    else
                    {
                        txtFolio.Item.Enabled = false;
                        txtItem.Item.Enabled  = true;
                        SAPChooseFromList.Bind("CFL_ML", txtItem);
                        txtItem.Active = true;
                    }
                }
                //--------------------------------------------------------------------------------------------------
                txtFolio.Active = true;
                mtx0.Columns.Item("C_Consumed").Visible = !checkBox.Checked ? true : false;
                mtx0.Columns.Item("C_Qty").Visible      = !checkBox.Checked ? false : true;
                mtx0.Columns.Item("C_Bags").Editable    = !checkBox.Checked ? false : true;
                ClearMatrix();

                if (!user.IsFoodPlant && checkBox.Checked)
                {
                    txtFolio.Value = foodTransferDAO.GetSeries(user.WhsCode, "59", "NextNumber").ToString();
                }
            }
            catch (Exception ex) {
                SAPException.Handle(ex, "chkStatus_ClickAfter");
            }
        }