protected void Page_PreRender(object sender, EventArgs e) { if (Page.Request.Params["id"] != null) { var dm = new DataManager(); SenderProfiles profile = new SenderProfiles() { ID = profileID }; profile.GetById(); hfCityID.Value = profile.CityID; lblCityCost.Text = profile.CityCost; lblCityDeliveryDate.Text = profile.CityDeliveryDate; lblCityDeliveryTerms.Text = profile.CityDeliveryTerms; tbCity.Text = profile.CitySelectedString; ddlRecipientStreetPrefix.Text = profile.AddressPrefix; tbRecipientStreet.Text = profile.AddressStreet; tbRecipientStreetNumber.Text = profile.AddressHouseNumber; tbRecipientKorpus.Text = profile.AddressKorpus; tbRecipientKvartira.Text = profile.AddressKvartira; tbDeliveryDate.Text = profile.SendDate; tbRecipientPhone.Text = profile.RecipientPhone1; tbRecipientPhone2.Text = profile.RecipientPhone2; tbRecipientFirstName.Text = profile.FirstName; tbRecipientLastName.Text = profile.LastName; tbRecipientThirdName.Text = profile.ThirdName; profileName = profile.ProfileName; } }
public static string GetProfileNameByID(string id) { if (id != null && id != "") { var profile = new SenderProfiles { ID = Convert.ToInt32(id) }; profile.GetById(); return(profile.ProfileName); } return(null); }