protected void UpdateButton_Click(object sender, EventArgs e) { // // Save the Funding Info fields // ProjectFundingSource biz = new ProjectFundingSource(); if (fundingId != -1) { biz.Get(fundingId); } if (projectId != -1) { CICHelper.SetBOValues(EditFundingPanel.Controls, biz, projectId); } else { CICHelper.SetBOValues(EditFundingPanel.Controls, biz, 0); } biz.Save(); if (biz["FundingSourceId"].ToString() != "") { fundingId = Int32.Parse(biz["FundingSourceId"].ToString()); } ProjectInvoiceGridView.Save(fundingId); GoToMainList(); }
private void PopulateFundingInfo() { ProjectFundingSource biz = new ProjectFundingSource(); biz.Get(fundingId); CICHelper.SetFieldValues(EditFundingPanel.Controls, biz); }
protected void BindFundingPanel() { ProjectFundingSource biz = new ProjectFundingSource(); biz.Get(fundingId); foreach (string colName in biz.FieldNames) { Label field = DisplayFundingPanel.FindControl(colName) as Label; if (field != null) { field.Text = biz[colName].ToString(); } } DetailsHeader.Text = biz["Source"].ToString(); }
protected void DeleteButton_Click(object sender, EventArgs e) { if (fundingId > -1) { ProjectFundingSource biz = new ProjectFundingSource(); biz.Delete(fundingId); } if (!string.IsNullOrEmpty(Request.QueryString["edit"]) && Request.QueryString["edit"] == "true") { RefreshAndGoToMainList(); } else { RefreshMainList(); } }
public static ProjectFundingSource CreateProjectFundingSource(string dataAreaId, string projectContractID, string fundingSourceId, global::System.DateTimeOffset addressValidFrom, global::System.DateTimeOffset addressValidTo, decimal addressLatitude, decimal addressLongitude) { ProjectFundingSource projectFundingSource = new ProjectFundingSource(); projectFundingSource.dataAreaId = dataAreaId; projectFundingSource.ProjectContractID = projectContractID; projectFundingSource.FundingSourceId = fundingSourceId; projectFundingSource.AddressValidFrom = addressValidFrom; projectFundingSource.AddressValidTo = addressValidTo; projectFundingSource.AddressLatitude = addressLatitude; projectFundingSource.AddressLongitude = addressLongitude; return(projectFundingSource); }