Exemple #1
0
 private void btnReloadVersions_Click(object sender, EventArgs e)
 {
     CTLM.ClearValues();
     txtNetVersion.Text = "";
     CTLM.SetStatus(EnumStatus.SEARCH);
     CTLM.Button_Click("btnOk");
     Application.DoEvents();
     while (!CTLM.EOF)
     {
         CTLM.ShowRSValues();
         Application.DoEvents();
         if (txtVersion.Text != txtNetVersion.Text)
         {
             int i = CTLM.RSPosition;
             CTLM.SetStatus(EnumStatus.EDIT);
             txtVersion.Text = txtNetVersion.Text;
             CTLM.Button_Click("btnOk");
             Application.DoEvents();
             CTLM.ClearValues();
             txtNetVersion.Text = "";
             CTLM.SetStatus(EnumStatus.SEARCH);
             CTLM.Button_Click("btnOk");
             Application.DoEvents();
             CTLM.setRSPosition(i);
         }
         txtNetVersion.Text = "";
         CTLM.Button_Click("btnNext");
     }
 }
Exemple #2
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            // Launch the robot process.
            using (var _sp = new SP(Values.gDatos, "pSimpleDeliveriesChangeStatus"))
            {
                bool _closed = lstFlags.itemStatus("CLOSED");

                _sp.AddParameterValue("@DeliveryNumber", txtDeliveryN.Text);
                _sp.AddParameterValue("@Service", cboService.Value.ToString());
                _sp.AddParameterValue("@Action", _closed ? "OPEN" : "CLOSE");
                try
                {
                    _sp.Execute();
                }
                catch (Exception ex)
                {
                    MsgError("Error launching process: " + ex.Message);
                    return;
                }
                if (_sp.LastMsg.Substring(0, 2) != "OK")
                {
                    MsgError(_sp.LastMsg);
                    return;
                }

                CTLM.Button_Click("btnCancel");
                ChangeButtonsStatus();
                MessageBox.Show(string.Format("Delivery {0} OK.", _closed ? "opened" : "closed"), "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #3
0
 private void DataGridView_SelectionChanged(object sender, EventArgs e)
 {
     if (VS.DataGridView.CurrentCell != null && !changing)
     {
         changing = true;
         CTLM.ClearValues();
         VS.DataGridView.Rows[VS.DataGridView.CurrentCell?.RowIndex ?? 0].Selected = true;
         CTLM.SetStatus(CommonTools.EnumStatus.SEARCH);
         txtTypeCode.Text = VS.CurrentRow.Cells[0].Value.ToString();
         txtSection.Text  = VS.CurrentRow.Cells[1].Value.ToString();
         txtTitle.Text    = VS.CurrentRow.Cells[2].Value.ToString();
         CTLM.Button_Click(CTLMButtonsEnum.btnOk);
         changing = false;
     }
 }