//---------------------
        // Insert DocIdentifica
        //---------------------
        public bool Ins_DocIdentifica(BE_ReqDocIdentifica Request)
        {
            bool exito = false;
            try
            {
                clsConection Obj = new clsConection();
                string Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Ins_DocIdentifica]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cDocCodigo", Request.cDocCodigo);
                        cm.Parameters.AddWithValue("nDocTipoNum", Request.nDocTipoNum);
                        cm.Parameters.AddWithValue("cDocNDoc", Request.cDocNDoc);

                        cm.Connection = cn;

                        if (cm.ExecuteNonQuery() > 0)
                        {
                            exito = true;
                        }
                        else throw new ApplicationException("se ha producido un error procedimiento almacenado: [usp_Ins_DocIdentifica]; Consulte al administrador del sistema");
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return exito;
        }
        //----------------------
        // Insert DocIdentifica
        //---------------------
        public bool Ins_DocIdentifica(string cDocCodigo, int nDocTipoNum, string cDocNDoc)
        {
            bool exito = false;

            try
            {
                BE_ReqDocIdentifica ReqConAsiento = new BE_ReqDocIdentifica();
                DA_ConAsiento ObjConAsiento = new DA_ConAsiento();

                ReqConAsiento.cDocCodigo = cDocCodigo;
                ReqConAsiento.nDocTipoNum = nDocTipoNum;
                ReqConAsiento.cDocNDoc = cDocNDoc;

                if (!ObjConAsiento.Ins_DocIdentifica(ReqConAsiento))
                {
                    throw new ApplicationException("Se encontraron errores en la transaccion: [Ins_DocIdentifica].!");
                }
                else
                {
                    exito = true;
                }

            }
            catch (Exception)
            {
                throw;
            }
            return exito;
        }