コード例 #1
0
 private void ValidaDados(mTipoMotor model)
 {
     if (this.ExisteTipoMotor(model.IdTipoMotorReal) == true)
     {
         throw new Exceptions.TipoMotor.CodigoTipoMotorExistenteException();
     }
 }
コード例 #2
0
 public frmBuscaTipoMotor(mTipoMotor modelParam, bool Alteracao)
 {
     InitializeComponent();
     this._model = modelParam;
     this._alteracao = Alteracao;
 }
コード例 #3
0
 public frmBuscaTipoMotor(mTipoMotor modelParam)
 {
     InitializeComponent();
     this._model = modelParam;
     this._alteracao = false;
 }
コード例 #4
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;
 }
コード例 #5
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;
     }
 }
コード例 #6
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;
            }
        }