public EstimateCollection FetchAll() { EstimateCollection coll = new EstimateCollection(); Query qry = new Query(Estimate.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
private void BindControls() { // Bind Estimate Queue estimateQueue = Estimate.GetEditableActiveEstimates(); lstEstimates.DataSource = estimateQueue; lstEstimates.DataBind(); //Sales Queue salesQueue = Estimate.GetSalesQueue(); lstSalesQueue.DataSource = salesQueue; lstSalesQueue.DataTextField = "DisplayText"; lstSalesQueue.DataValueField = "EstId"; lstSalesQueue.DataBind(); lstSalesQueue.Items[0].Selected = true; activeSalesQueueItem = new Estimate(lstSalesQueue.SelectedValue); string[] regions = Directory.GetDirectories(Paths.Prospects, "*", SearchOption.TopDirectoryOnly); for (int i = regions.Length - 1; i > -1; i--) { var fullPath = regions[i]; var region = fullPath.Substring(fullPath.LastIndexOf('\\') + 1); regions[i] = region; } ddlProspectRegion.DataSource = regions; ddlProspectRegion.DataBind(); // Update Cache Cache["SalesQueue"] = salesQueue; Cache["ActiveEstimate"] = activeSalesQueueItem; Cache["Estimates"] = estimateQueue; Cache["Regions"] = regions; ddlAddProjMgr.DataBind(); ddlSalesperson.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Label lblHeading; lblHeading = (Label)Master.FindControl("lblPageHeading"); lblHeading.Text = "Veritas - Estimate Priority"; if (!IsPostBack) { BindControls(); cmdSubmitEst.Enabled = activeSalesQueueItem.BidDueDate != null; } else { estimateQueue = (EstimateCollection)Cache["Estimates"]; activeSalesQueueItem = (Estimate)Cache["ActiveEstimate"]; } }
public EstimateCollection FetchByQuery(Query qry) { EstimateCollection coll = new EstimateCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public EstimateCollection FetchByID(object Id) { EstimateCollection coll = new EstimateCollection().Where("ID", Id).Load(); return coll; }