コード例 #1
0
ファイル: HuellaData.cs プロジェクト: hvivani/SOffT
        public int Update(HuellaEntity huella)
        {
            MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Actualizando: " +  huella.ToString());
            try
            {
                StringBuilder sql = new StringBuilder();
                sql.Append(" UPDATE ");
                sql.Append(this.tabla);
                sql.Append(" SET");
                sql.Append(" huella = '");
                sql.Append(huella.Huella);
                sql.Append("' WHERE ");
                sql.Append(" legajo = ");
                sql.Append(huella.Legajo);
                sql.Append(" and idHuella = ");
                sql.Append(huella.DedoHuella.Contenido);
                return Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString());

            }
            catch (Exception ex)
            {
                MyLog4Net.Instance.getCustomLog(this.GetType()).Error("update(). " + ex.Message, ex);
                throw;
            }
        }
コード例 #2
0
ファイル: HuellaData.cs プロジェクト: hvivani/SOffT
        public int Insert(HuellaEntity huella)
        {
            MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Agregando: " + huella.ToString());
            try
            {
                StringBuilder sql = new StringBuilder();
                sql.Append(" INSERT INTO ");
                sql.Append(this.tabla);
                sql.Append(" VALUES(");
                sql.Append(huella.Legajo);
                sql.Append(", ");
                sql.Append(huella.DedoHuella.Contenido);
                sql.Append(", '");
                sql.Append(huella.Huella);
                sql.Append("') ");
                return Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString());

            }
            catch (Exception ex)
            {
                MyLog4Net.Instance.getCustomLog(this.GetType()).Error("insert(). " + ex.Message, ex);
                throw;
            }
        }