/// <summary>
        /// Fill Objects + Open Connection
        /// </summary>
        /// <param name="tablePrefix"></param>
        /// <param name="connectionStrings"></param>
        /// <param name="repType"></param>
        /// <param name="histSufix"></param>
        /// <param name="histId"></param>
        /// <param name="nameId"></param>
        /// <param name="activeId"></param>
        /// <param name="orderId"></param>
        public BaseRepository(String tablePrefix = "dbo.", String connectionStrings = "cnn", RepType repType = RepType.hasntHist, String histSufix = "Hist"
                              , String histId    = "IdHist", String nameId          = "id", String activeId = "active = 1", String orderId = "date desc")
        {
            this.tablePrefix = tablePrefix;

            this.histSufix = histSufix;
            this.histId    = histId;

            this.nameId   = nameId;
            this.activeId = activeId;
            this.orderId  = orderId;

            this.repType = repType;

            this.baseConnection = new BaseConnection(connectionStrings);
        }
Exemplo n.º 2
0
        public void ChangeRepostiory(RepType type)
        {
            switch (type)
            {
            case RepType.Binary:
                rep_type = "binaryFile";
                break;

            case RepType.BinarySerializable:
                rep_type = "binarySerializer";
                break;

            case RepType.XML:
                rep_type = "XMLSerializer";
                break;
            }
            service = new BookService(rep_type);
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["USER"] == null)
     {
         Response.Redirect("~/Login.aspx");
     }
     else
     {
         if (Session["USER"] == null)
         {
             Response.Redirect("~/Login.aspx");
         }
         else
         {
             DBBlogFilmEntities db = new DBBlogFilmEntities();
             var typ = db.TBLTYPE.ToList();
             RepType.DataSource = typ;
             RepType.DataBind();
         }
     }
 }
Exemplo n.º 4
0
        public ReplacementCondition(string name, string type, string oldName, string newName, string oldResultField = null,
																string newResultField = null)
        {
            Name = name;
            OldName = oldName;
            NewName = newName;
            try
            {
                Type = (RepType)Enum.Parse(typeof(RepType), type, true);
            }
            catch
            {
                Type = RepType.Invalid;
            }
            if (Type == RepType.Catalog)
            {
                OldResultField = string.IsNullOrEmpty(oldResultField) ? oldName : oldResultField;
                NewResultField = string.IsNullOrEmpty(newResultField) ? newName : newResultField;
            }
        }
Exemplo n.º 5
0
 public ReplacementCondition(string name, string type, string oldName, string newName)
 {
     Name = name;
     OldName = oldName;
     NewName = newName;
     try
     {
         Type = (RepType)Enum.Parse(typeof(RepType),type, true);
     }
     catch
     {
         Type = RepType.Invalid;
     }
 }