Esempio n. 1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (ultraValidator1.Validate(true, false).IsValid)
            {
                if (txtFrom.Text.Trim() == "")
                {
                    MessageBox.Show("Por favor ingrese Correo Electrónico.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                if (txtSubject.Text.Trim() == "")
                {
                    MessageBox.Show("Por favor ingrese un Asunto.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                if (rbCotizacion.Checked)
                {
                    var frm = new Reports.frmConsolidateCotizacion(_serviceOrderId, _protocolId);
                    //frm.ShowDialog();
                }
                else
                {
                    var frm = new Reports.frmConsolidateServiceOrder(_serviceOrderId, _protocolId);
                    //frm.ShowDialog();
                }

                this.Enabled = false;
                _frmWaiting.Show(this);
                backgroundWorker1.RunWorkerAsync();
            }
        }
Esempio n. 2
0
        private void btnCotizacion_Click(object sender, EventArgs e)
        {
            ServiceOrderBL oServiceOrderBL = new ServiceOrderBL();
            var            Lista           = oServiceOrderBL.ObtenerProtocolos(_ServiceOrderId);
            List <string>  ListaProtocolos = new List <string>();

            foreach (var item in Lista)
            {
                ListaProtocolos.Add(item.Value1);
            }
            var frm = new Reports.frmConsolidateCotizacion(_ServiceOrderId, ListaProtocolos);

            frm.ShowDialog();


            //Reports.frmReporteCotizacion frm = new Reports.frmReporteCotizacion(_ServiceOrderId);
            //frm.ShowDialog();
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (ultraValidator1.Validate(true, false).IsValid)
            {
                if (txtLabel.Text.Trim() == "")
                {
                    MessageBox.Show("Por favor ingrese Correo Electrónico.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                if (txtSubject.Text.Trim() == "")
                {
                    MessageBox.Show("Por favor ingrese un Asunto.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                if (rbCotizacion.Checked)
                {
                    var frm = new Reports.frmConsolidateCotizacion(_serviceOrderId, _protocolId);
                    //frm.ShowDialog();
                }
                else
                {
                    var frm = new Reports.frmConsolidateServiceOrder(_serviceOrderId, _protocolId);
                    //frm.ShowDialog();
                }
                EmailBL  oEmailBL  = new EmailBL();
                emailDto oemailDto = new emailDto();
                oemailDto.v_Email = txtLabel.Text;
                OperationResult objOperationResult = new OperationResult();
                oEmailBL.AddEmail(ref objOperationResult, oemailDto);
                this.Enabled = false;
                _frmWaiting.Show(this);
                backgroundWorker1.RunWorkerAsync();
            }
        }