public static BudgetItensFactory GetInstance() { if (instance == null) { instance = new BudgetItensFactory(); } return(instance); }
public void addBudgetItem(Budget budgetItem) { DataRow dr = dt.NewRow(); dr["id"] = counter++; dr["description"] = budgetItem.Description; dr["value"] = budgetItem.Value; BudgetItensFactory.GetInstance().addBudgetItem(dr); }
protected void Page_Load(object sender, EventArgs e) { budgetFactory = BudgetItensFactory.GetInstance(); participantFactory = ParticipantsFactory.GetInstance(); if (!IsPostBack) { DataList1.DataBind(); DataListParticipantsSelected.DataBind(); } }
protected void CreateEvent_Click(object sender, EventArgs e) { HttpCookie c = Request.Cookies["UserType"]; if (c == null) { Response.Redirect("Home.aspx"); } else if (c.Value == "Participant") { BudgetItensFactory.GetInstance().ClearTable(); ParticipantsFactory.GetInstance().ClearTable(); Response.Redirect("CreateEvent.aspx"); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "Alert", "alert('Create Event can be accessed by venue host.');", true); } }
public List <Budget> getBudgetItens() { return(BudgetItensFactory.GetInstance().getBudget()); }
public DataSet getBudgetsItens() { return(BudgetItensFactory.GetInstance().retrieveBudgetsItens()); }
public Boolean exists(DataRow dr) { return(BudgetItensFactory.GetInstance().existItem(dr)); }
public void ClearTableInstance() { instance = new BudgetItensFactory(); }
public void ClearTable() { BudgetItensFactory.GetInstance().ClearTableInstance(); }
public double GetTotal() { return(BudgetItensFactory.GetInstance().GetTotalValue()); }