protected void Page_Load(object sender, EventArgs e) { long id; if (long.TryParse(Request["id"], out id)) { selectedItem = FieldTypesMapper.GetByID(id); if (!IsPostBack) { UpdateFieldsFromObject(); } } this.Page.Title = this.SectionTitle.Text = GetSectionTitle(); }
public string DeleteItemPermanently(long id) { var item = BaseMapper.GetObjectFromContext(FieldTypesMapper.GetByID(id)); if (item != null) { Return returnObj = FieldTypesMapper.DeletePermanently(item); if (returnObj.IsError) { return(jGrowlHelper.GenerateCode(new jGrowlMessage("Error", "Error deleting item permanently", jGrowlMessage.jGrowlMessageType.Error, returnObj.Error), true)); } else { return(jGrowlHelper.GenerateCode(new jGrowlMessage("Success", "Item was successfully deleted permanently", jGrowlMessage.jGrowlMessageType.Success), false)); } } return(""); }