Exemplo n.º 1
0
 public MetalinkRecord[] Search(MetalinkRecord query, string system="Default") {
     MetalinkRecord[] result = null;
     using (var connection = myapp.ioc.getConnection(system)) {
         result = connection.ExecuteOrm<MetalinkRecord>("exec comdiv.metalink_search", query);
     }
     return result;
 }
Exemplo n.º 2
0
        public void search(string system, string srctype, string trgtype, string src, string trg, string type, string subtype) {
            var mlr = new MetalinkRecord();

            mlr.SrcType = srctype;
            mlr.TrgType = trgtype;
            mlr.Src = src;
            mlr.Trg = trg;
            mlr.Type = type;
            mlr.SubType = subtype;
            mlr.Active = true;
            var result = new MetalinkRepository().Search(mlr, system);

            PropertyBag["items"] = result;

        }
Exemplo n.º 3
0
 public void save(string system, string code, string srctype, string trgtype, string src, string trg, string type, string subtype, string tag, string active) {
     var mlr = new MetalinkRecord();
     if(active.noContent()) {
         active = "True";
     }
     mlr.Code = code;
     mlr.SrcType = srctype;
     mlr.TrgType = trgtype;
     mlr.Src = src;
     mlr.Trg = trg;
     mlr.Type = type;
     mlr.SubType = subtype;
     mlr.Tag = tag;
     mlr.Active = active.toBool();
     new MetalinkRepository().Save(mlr,system);
     RenderText("OK");
 }
Exemplo n.º 4
0
 public void Save(MetalinkRecord record, string system = "Default") {
    using(var connection = myapp.ioc.getConnection(system)) {
        connection.ExecuteNonQuery("exec comdiv.metalink_set",record);  
    }
 }