Esempio n. 1
0
        //-----------------------------------------------------------------------------------------------------------//

        private void Get_Indirilmis_Malzemeler()
        {
            try
            {
                // Cursor
                Cursor.Current = Cursors.WaitCursor;

                // Create Service
                alfaSAP p_SAP = new alfaSAP();

                // Parameters
                WR.ZMM005_UYSTOKNAKLI_05 prms = new Terminal2012.WR.ZMM005_UYSTOKNAKLI_05();
                prms.IV_MODE         = "X";
                prms.IV_FISNO        = txtFisNo.Text;
                prms.T_FISITEMS_EMIR = new Terminal2012.WR.ZMM_S_UY03[0];

                // Call Service
                FN05Result02 = p_SAP.ZMM005_UYSTOKNAKLI_05(prms);

                // Grid
                grdIndirilmisMalzemeler.DataSource = FN05Result02.T_FISITEMS_EMIR;

                // Check Data
                if (FN05Result02.T_FISITEMS_EMIR.Length > 0)
                {
                    // Select Row
                    grdIndirilmisMalzemeler.Select(grdIndirilmisMalzemeler.CurrentRowIndex);

                    // RecordCount
                    lbRecordCount02.Text = "Adet = " + FN05Result02.T_FISITEMS_EMIR.Length.ToString();
                }
                else
                {
                    // RecordCount
                    lbRecordCount02.Text = "Adet = 0";
                }

                // Show Error
                if (FN05Result02.E_SUBRC == "4")
                {
                    alfaMsg.Error(FN05Result02.T_MESSAGES[0].MESSAGE);
                }

                // Cursor
                Cursor.Current = Cursors.Default;
            }
            catch (Exception ex)
            {
                // Error
                alfaMsg.Error(ex.Message);
            }
        }
Esempio n. 2
0
        //-----------------------------------------------------------------------------------------------------------//

        private void Get_Indirilecek_Malzemeler()
        {
            try
            {
                // Cursor
                Cursor.Current = Cursors.WaitCursor;

                // Create Service
                alfaSAP p_SAP = new alfaSAP();

                // Parameters
                WR.ZMM005_UYSTOKNAKLI_05 prms = new Terminal2012.WR.ZMM005_UYSTOKNAKLI_05();
                prms.IV_MODE         = " ";
                prms.IV_FISNO        = txtFisNo.Text;
                prms.T_FISITEMS_EMIR = new Terminal2012.WR.ZMM_S_UY03[0];

                // Call Service
                FN05Result01 = p_SAP.ZMM005_UYSTOKNAKLI_05(prms);

                // Create Table
                System.Data.DataTable p_Table = alfaGrid.ToDataTable(FN05Result01.T_FISITEMS_EMIR, "T_FISITEMS_EMIR");

                // Create Style
                alfaGrid.CreateTableStyle(grdIndirilecekMalzemeler, p_Table, "DEFAULT");

                // Assign to Grid
                grdIndirilecekMalzemeler.DataSource = p_Table;

                // Check Data
                if (FN05Result01.T_FISITEMS_EMIR.Length > 0)
                {
                    // Select FirstRow
                    grdIndirilecekMalzemeler.Select(0);
                    grdIndirilecekMalzemeler.CurrentRowIndex = 0;

                    // Set Controls
                    alfaCtrl.EnableControl(btnNext, Color.Green);
                    alfaCtrl.EnableControl(btnAdres, Color.Blue);
                    alfaCtrl.EnableControl(btnIndir, Color.Blue);
                    alfaCtrl.EnableControl(txtBarkod, Color.Black);

                    // Focus
                    txtBarkod.Focus();

                    // RecordCount
                    lbRecordCount01.Text = "Adet = " + FN05Result01.T_FISITEMS_EMIR.Length.ToString();
                }
                else
                {
                    // Set Controls
                    alfaCtrl.EnableControl(btnNext, Color.Green);
                    alfaCtrl.DisableControl(btnAdres, Color.Silver);
                    alfaCtrl.DisableControl(txtBarkod, Color.Silver);
                    alfaCtrl.DisableControl(btnIndir, Color.Silver);

                    // RecordCount
                    lbRecordCount01.Text = "Adet = 0";
                }

                // Show Error
                if (FN05Result01.E_SUBRC == "4")
                {
                    alfaMsg.Error(FN05Result01.T_MESSAGES[0].MESSAGE);
                }

                // Cursor
                Cursor.Current = Cursors.Default;
            }
            catch (Exception ex)
            {
                // Error
                alfaMsg.Error(ex.Message);
            }
        }