Beispiel #1
0
        //-----------------------------------------------------------------------------------------------------------//

        private void btnDown_Click(object sender, EventArgs e)
        {
            // Get Barkod Line
            WR.ZMM_S_TARTIMDET_ITEMS p_BarkodLine = this.Find_Barkod_Line(tbBarkod.Text);

            // Check Barkod
            if (p_BarkodLine == null)
            {
                alfaMsg.Error("Yanlış Barkod Girdiniz !"); return;
            }

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

            // Parameters
            WR.ZMM005_UYSTOKNAKLI_09 prms = new Terminal2012.WR.ZMM005_UYSTOKNAKLI_09();

            // Set Parameters
            prms.I_MODE      = m_SPACE;
            prms.I_OPERATION = "M";
            prms.I_ITEM      = p_BarkodLine;
            prms.I_FISNO     = tbFisNo.Text;
            prms.I_LGPBE     = tbAdres.Text;
            prms.I_YUKEMRNO  = tbYuklemeEmri.Text;
            prms.T_ITEMS     = new Terminal2012.WR.ZMM_S_TARTIMDET_ITEMS[0];
            prms.T_MESSAGES  = new Terminal2012.WR.ZMM_S_WSMESSAGES[0];

            // Call Service
            WR.ZMM005_UYSTOKNAKLI_09Response resp = p_SAP.ZMM005_UYSTOKNAKLI_09(prms);

            // Show Result
            if (resp.E_SUBRC == "4")
            {
                alfaMsg.Error(resp.T_MESSAGES[0].MESSAGE);
            }
            else
            {
                // Clear
                tbBarkod.Text = string.Empty;

                // Get List
                this.Get_Indirilecek_Malzemeler();
            }
        }
Beispiel #2
0
        //-----------------------------------------------------------------------------------------------------------//

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

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

                // Create Parameters
                WR.ZMM005_UYSTOKNAKLI_09 prms = new Terminal2012.WR.ZMM005_UYSTOKNAKLI_09();

                // Set Parameters
                prms.I_MODE      = m_SPACE;
                prms.I_OPERATION = "L";
                prms.I_LGPBE     = string.Empty;
                prms.I_FISNO     = tbFisNo.Text;
                prms.I_YUKEMRNO  = tbYuklemeEmri.Text;
                prms.I_ITEM      = new Terminal2012.WR.ZMM_S_TARTIMDET_ITEMS();
                prms.T_ITEMS     = new Terminal2012.WR.ZMM_S_TARTIMDET_ITEMS[0];
                prms.T_MESSAGES  = new Terminal2012.WR.ZMM_S_WSMESSAGES[0];

                // Call Service
                Result01 = p_SAP.ZMM005_UYSTOKNAKLI_09(prms);

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

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

                // Assign to Grid
                grdIndirilecekMalzemeler.DataSource = p_Table;

                // Disable BtnDown
                alfaCtrl.DisableControl(btnDown, Color.Silver);

                // Check Data
                if (Result01.T_ITEMS.Length > 0)
                {
                    // Select Row
                    grdIndirilecekMalzemeler.Select(grdIndirilecekMalzemeler.CurrentRowIndex);

                    // Set Controls
                    alfaCtrl.EnableControl(btnNext, Color.Green);
                    alfaCtrl.EnableControl(tbBarkod, Color.Black);
                    alfaCtrl.EnableControl(tbAdres, Color.Black);

                    // RecordCount
                    lbRecordCount01.Text = "Adet = " + Result01.T_ITEMS.Length.ToString();
                }
                else
                {
                    // Set Controls
                    alfaCtrl.EnableControl(btnNext, Color.Green);
                    alfaCtrl.DisableControl(tbBarkod, Color.Silver);
                    alfaCtrl.DisableControl(tbAdres, Color.Silver);

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

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

                // Cursor
                Cursor.Current = Cursors.Default;
            }
            catch (Exception ex)
            {
                // Error
                alfaMsg.Error(ex.Message);
            }
        }
Beispiel #3
0
        //-----------------------------------------------------------------------------------------------------------//

        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                // Cursor
                alfaMsg.WaitCursor();

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

                // Create Params
                WR.ZMM005_UYSTOKNAKLI_09 prms = new Terminal2012.WR.ZMM005_UYSTOKNAKLI_09();

                // Set Params
                prms.I_MODE      = m_SPACE;
                prms.I_OPERATION = "D";
                prms.I_FISNO     = tbFisNo.Text;
                prms.I_LGPBE     = tbAdres.Text;
                prms.I_YUKEMRNO  = tbYuklemeEmri.Text;
                prms.T_MESSAGES  = new Terminal2012.WR.ZMM_S_WSMESSAGES[0];
                prms.T_ITEMS     = new Terminal2012.WR.ZMM_S_TARTIMDET_ITEMS[0];

                // Create Line
                WR.ZMM_S_TARTIMDET_ITEMS line = new Terminal2012.WR.ZMM_S_TARTIMDET_ITEMS();

                // Get Table
                DataTable p_Table = (DataTable)grdIndirilmisMalzemeler.DataSource;

                // Get Row
                DataRow row = p_Table.Rows[grdIndirilmisMalzemeler.CurrentRowIndex];

                // Assign Line
                line.BARKOD  = row["BARKOD"].ToString();
                line.KG      = decimal.Parse(row["KG"].ToString());
                line.MIKTAR  = decimal.Parse(row["MIKTAR"].ToString());
                line.OB      = row["OB"].ToString();
                line.PARTI   = row["PARTI"].ToString();
                line.SIP_KLM = row["SIP_KLM"].ToString();
                line.SIP_NO  = row["SIP_NO"].ToString();
                line.STOK_NO = row["STOK_NO"].ToString();
                line.TANIM   = row["TANIM"].ToString();

                // Set Line
                prms.I_ITEM     = line;
                prms.T_MESSAGES = new Terminal2012.WR.ZMM_S_WSMESSAGES[0];

                // Call Service
                WR.ZMM005_UYSTOKNAKLI_09Response resp = p_SAP.ZMM005_UYSTOKNAKLI_09(prms);

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

                // Referesh Data
                this.Get_Indirilecek_Malzemeler();
                this.Get_Indirilmis_Malzemeler();

                // Cursor
                alfaMsg.DefaultCursor();
            }
            catch (Exception ex)
            {
                // Error
                alfaMsg.Error(ex.Message);
            }
        }
Beispiel #4
0
        //-----------------------------------------------------------------------------------------------------------//

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

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

                // Create Parameters
                WR.ZMM005_UYSTOKNAKLI_09 prms = new Terminal2012.WR.ZMM005_UYSTOKNAKLI_09();

                // Set Parameters
                prms.I_MODE      = "X";
                prms.I_OPERATION = "L";
                prms.I_FISNO     = tbFisNo.Text;
                prms.I_LGPBE     = tbAdres.Text;
                prms.I_YUKEMRNO  = tbYuklemeEmri.Text;
                prms.I_ITEM      = new Terminal2012.WR.ZMM_S_TARTIMDET_ITEMS();
                prms.T_ITEMS     = new Terminal2012.WR.ZMM_S_TARTIMDET_ITEMS[0];
                prms.T_MESSAGES  = new Terminal2012.WR.ZMM_S_WSMESSAGES[0];

                // Call Service
                Result02 = p_SAP.ZMM005_UYSTOKNAKLI_09(prms);

                // Create Table
                DataTable p_Table = alfaGrid.ToDataTable(Result02.T_ITEMS, "T_ITEMS");

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

                // Assign to Grid
                grdIndirilmisMalzemeler.DataSource = p_Table;

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

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

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

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