示例#1
0
        public override Lfx.Types.OperationResult Guardar()
        {
            var Em = new Lazaro.Orm.EntityManager(this.Connection, Lfx.Workspace.Master.MetadataFactory);

            Em.Persist(this);

            /* qGen.IStatement Comando;
             *
             * if (this.Existe == false) {
             *      Comando = new qGen.Insert(this.TablaDatos);
             * } else {
             *      Comando = new qGen.Update(this.TablaDatos);
             *      Comando.WhereClause = new qGen.Where(this.CampoId, this.Id);
             * }
             *
             * Comando.ColumnValues.AddWithValue("nombre", this.Nombre);
             * Comando.ColumnValues.AddWithValue("porcentaje", this.Porcentaje);
             * Comando.ColumnValues.AddWithValue("importe_minimo", this.ImporteMinimo);
             *
             * this.AgregarTags(Comando);
             *
             * this.Connection.ExecuteNonQuery(Comando); */

            return(base.Guardar());
        }
示例#2
0
        public override Lfx.Types.OperationResult Guardar()
        {
            var Em = new Lazaro.Orm.EntityManager(this.Connection, Lfx.Workspace.Master.MetadataFactory);

            Em.Persist(this);

            /* qGen.IStatement Comando;
             *
             * if (this.Existe == false) {
             *      Comando = new qGen.Insert(this.TablaDatos);
             * } else {
             *      Comando = new qGen.Update(this.TablaDatos);
             *      Comando.WhereClause = new qGen.Where(this.CampoId, this.Id);
             * }
             *
             * Comando.ColumnValues.AddWithValue("nombre", this.Nombre);
             * Comando.ColumnValues.AddWithValue("nombresing", this.NombreSingular);
             * Comando.ColumnValues.AddWithValue("stock_minimo", this.PuntoDeReposicion);
             * Comando.ColumnValues.AddWithValue("web", this.PublicacionWeb);
             * Comando.ColumnValues.AddWithValue("requierens", ((int)(this.Seguimiento)));
             * Comando.ColumnValues.AddWithValue("obs", this.Obs);
             * if (this.Rubro == null)
             *      Comando.ColumnValues.AddWithValue("id_rubro", null);
             * else
             *      Comando.ColumnValues.AddWithValue("id_rubro", this.Rubro.Id);
             * if (this.Alicuota == null)
             *      Comando.ColumnValues.AddWithValue("id_alicuota", null);
             * else
             *      Comando.ColumnValues.AddWithValue("id_alicuota", this.Alicuota.Id);
             * Comando.ColumnValues.AddWithValue("garantia", this.Garantia);
             *
             * this.AgregarTags(Comando);
             *
             * this.Connection.ExecuteNonQuery(Comando); */

            return(base.Guardar());
        }