Exemplo n.º 1
0
 private void ValidaDados(mTipoMotor model)
 {
     if (this.ExisteTipoMotor(model.IdTipoMotorReal) == true)
     {
         throw new Exceptions.TipoMotor.CodigoTipoMotorExistenteException();
     }
 }
Exemplo n.º 2
0
        private void btnBuscaTipoMotor_Click(object sender, EventArgs e)
        {
            this._modelTipoMotor = new mTipoMotor();
            frmBuscaTipoMotor objForm = new frmBuscaTipoMotor(this._modelTipoMotor);

            try
            {
                DialogResult resultado = objForm.ShowDialog();
                if (resultado == DialogResult.Cancel)
                {
                    this._modelTipoMotor   = null;
                    this.txtTipoMotor.Text = string.Empty;
                }
                else
                {
                    this.txtTipoMotor.Text           = this._modelTipoMotor.IdTipoMotorReal + " - " + this._modelTipoMotor.DscTipoMotor;
                    this.lblCodigoFamiliaMotor.Text += this._modelTipoMotor.IdTipoMotorReal;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objForm = null;
            }
        }
Exemplo n.º 3
0
 private void btnLimpa_Click(object sender, EventArgs e)
 {
     base.LimpaDadosTela(this);
     this._listaKitFamilia  = null;
     this._modelEstoque     = null;
     this._modelMotor       = null;
     this._modelTipoMotor   = null;
     this._modelNumeroMotor = null;
 }
Exemplo n.º 4
0
        private mTipoMotor PegaDadosTela()
        {
            mTipoMotor model = new mTipoMotor();
            rTipoMotor regra = new rTipoMotor();

            try
            {
                model.IdTipoMotor     = regra.BuscaMaxId();
                model.IdTipoMotorReal = this.txtIdReal.Text.ToUpper();
                model.DscTipoMotor    = this.txtNmTipoMotor.Text;
                model.FlgAtivo        = true;

                return(model);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                model = null;
            }
        }
Exemplo n.º 5
0
 public frmBuscaTipoMotor(mTipoMotor modelParam, bool Alteracao)
 {
     InitializeComponent();
     this._model     = modelParam;
     this._alteracao = Alteracao;
 }
Exemplo n.º 6
0
 public frmBuscaTipoMotor(mTipoMotor modelParam)
 {
     InitializeComponent();
     this._model     = modelParam;
     this._alteracao = false;
 }