Beispiel #1
0
        public bool UpdateCliente(cf_Cliente cliente)
        {
            // (dynamic obj, Type _tipoClase, List<string> l_no_considerados, SqlConnection sqlCon, SqlTransaction sqlTran, PROCESO_SP _sp)
            //bool resultado = true;
            //using (SqlConnection sqlCon = Corp.Datos.Conexion.ObtieneConexion("CF"))
            //{
            //    using (SqlTransaction sqlTran = sqlCon.BeginTransaction())
            //    {
            //        try
            //        {
            //            int result_tran = InstanceOF.Establecer_Objeto(cliente, typeof(cf_Cliente), new List<string>(), sqlCon, sqlTran, InstanceOF.PROCESO_SP.CF_CLIENTE_UPDATE);
            //            if (result_tran == -1) throw new Exception();

            //            sqlTran.Commit();
            //        }
            //        catch (Exception)
            //        {
            //            sqlTran.Rollback();
            //            resultado = false;
            //        }
            //    }
            //}
            //return resultado;
            int control_resultado = InstanceOF.Establecer_Objeto(cliente, typeof(cf_Cliente), new List <string>(), InstanceOF.PROCESO_SP.CF_CLIENTE_UPDATE);

            return(control_resultado == -1 ? false : true);
        }
Beispiel #2
0
 public bool UpdateCliente(cf_Cliente cliente)
 {
     // (dynamic obj, Type _tipoClase, List<string> l_no_considerados, SqlConnection sqlCon, SqlTransaction sqlTran, PROCESO_SP _sp)
     //bool resultado = true;
     //using (SqlConnection sqlCon = Corp.Datos.Conexion.ObtieneConexion("CF"))
     //{
     //    using (SqlTransaction sqlTran = sqlCon.BeginTransaction())
     //    {
     //        try
     //        {
     //            int result_tran = InstanceOF.Establecer_Objeto(cliente, typeof(cf_Cliente), new List<string>(), sqlCon, sqlTran, InstanceOF.PROCESO_SP.CF_CLIENTE_UPDATE);
     //            if (result_tran == -1) throw new Exception();
                 
     //            sqlTran.Commit();                        
     //        }
     //        catch (Exception)
     //        {
     //            sqlTran.Rollback();
     //            resultado = false;
     //        }
     //    }
     //}
     //return resultado;
     int control_resultado = InstanceOF.Establecer_Objeto(cliente, typeof(cf_Cliente), new List<string>(), InstanceOF.PROCESO_SP.CF_CLIENTE_UPDATE);
     return control_resultado == -1 ? false : true;
 }