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;
 }
        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;

        }
 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");
 }
 public void Save(MetalinkRecord record, string system = "Default") {
    using(var connection = myapp.ioc.getConnection(system)) {
        connection.ExecuteNonQuery("exec comdiv.metalink_set",record);  
    }
 }