コード例 #1
0
 private string ObtenerRfc(string paterno, string materno, string nombre, DateTime fechanacimiento)
 {
     Empleados.Core.RFC rfc = new Empleados.Core.RFC();
     string _rfc = rfc.ObtieneRFC(paterno, materno, nombre);
     string _homo = rfc.ClaveHomonimia(paterno, materno, nombre);
     string _fecha = fechanacimiento.ToString("yyMMdd");
     string _dv = rfc.DigitoVerificador(_rfc + _fecha + _homo);
     _rfc = _rfc + _fecha + _homo + _dv;
     return _rfc;
 }
コード例 #2
0
ファイル: frmEmpleados.cs プロジェクト: specimen90868/Cominvi
        private void dtpFechaNacimiento_Leave(object sender, EventArgs e)
        {
            txtEdad.Text = ObtieneEdad(dtpFechaNacimiento.Value).ToString();

            Empleados.Core.RFC rfc = new Empleados.Core.RFC();
            string _rfc = rfc.ObtieneRFC(txtApPaterno.Text, txtApMaterno.Text, txtNombre.Text);
            string _homo = rfc.ClaveHomonimia(txtApPaterno.Text, txtApMaterno.Text, txtNombre.Text);
            string _fecha = dtpFechaNacimiento.Value.ToString("yyMMdd");
            string _dv = rfc.DigitoVerificador(_rfc + _fecha + _homo);
            _rfc = _rfc + _fecha + _homo + _dv;
            txtRFC.Text = _rfc;
        }