public bool Insert(ObjComercio comercio) { try { return(new Data.DatComercio().Insert(comercio)); } catch (Exception) { throw; } }
public bool Insert(ObjComercio comercio) { try { int resultado = 0; DateTime fecha = DateTime.Now; resultado = new HCSoft.Util.ConexionMy().EjecutaConsulta("INSERT INTO base_comercios(email,password,base_tipo_comercio_id,fecha_registro) VALUES('" + comercio.Email + "','" + comercio.Password + "'," + comercio.TipoComercioId + ", '" + fecha.ToString("yyyy-MM-dd H:mm:ss") + "')"); if (resultado != 0) { return(true); } return(false); } catch (Exception) { throw; } }