/// <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); }
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); }
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(); } } }
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; } }
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; } }