using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using GZTW.AyaNova.BLL; public partial class ContractEdit : BaseThemePage { protected void Page_Load(object sender, EventArgs e) { Util.Localize(this.Page); if (Request.QueryString["id"] == null) CloseMe(); Contract c=Contract.GetItem(new Guid(Request.QueryString["id"].ToString())); Page.Title = Util.LocaleText("O.Contract") + " - " + c.Name; lblHeader.Text = Util.StringWebify(c.Name); System.Text.StringBuilder sb = new System.Text.StringBuilder(); if (c.CanWiki) { sb.Append(" "); sb.Append(""); sb.Append(""); lblHeader.Text += sb.ToString(); sb.Length = 0; } sb.Append(NameFetcher.GetItem(new TypeAndID(RootObjectTypes.Region, c.RegionID)).RecordName ); sb.Append("\r\n"); sb.Append(""+Util.LocaleText("Contract.Label.DiscountParts")+""); sb.Append(": "); sb.Append(c.DiscountParts.ToString("p")); sb.Append("\r\n"); sb.Append("" + Util.LocaleText("Contract.Label.Notes") + ""); sb.Append("\r\n"); sb.Append(c.Notes); sb.Append("\r\n"); sb.Append("" + Util.LocaleText("Contract.Label.ContractRatesOnly") + ""); sb.Append(": "); sb.Append(c.ContractRatesOnly.ToString()); sb.Append("\r\n"); if (c.Rates.Count > 1) { RatePickList rp = RatePickList.GetListWithContract(c.ID); sb.Append("" + Util.LocaleText("ContractRate.Label.List") + ""); sb.Append("\r\n"); foreach (ContractRate r in c.Rates) { RatePickList.RatePickListInfo i = rp[r.RateID]; sb.Append(i.Name); sb.Append(" - "); sb.Append(i.Charge.ToString("c")); sb.Append("\r\n"); } } lblDetails.Text = Util.StringWebify(sb.ToString()); } }