protected void cmdUpdate_Click(object sender, EventArgs e) { AdvertiseInfo info = AdvertiseDB.GetInfo(ConvertUtility.ToInt32(txtID.Text)); if (info == null) { cmdEmpty_Click(null, null); return; } info.Advertise_Name = txtName.Text; info.Advertise_Enable = chkEnable.Checked; info.Advertise_Height = ConvertUtility.ToInt32(txtHeight.Text); info.Advertise_Width = ConvertUtility.ToInt32(txtWidth.Text); info.Advertise_StartDate = SelectDate1.GetDate(); info.Advertise_EndDate = SelectDate2.GetDate(); info.Advertise_Path = txtPath.Text; info.Advertise_PositionID = ConvertUtility.ToInt32(lstPositions.SelectedValue); info.Advertise_Type = dropType.SelectedValue; info.Advertise_RedirectURL = txtUrl.Text; info.Advertise_Lang = AppEnv.GetLanguage(); string location = string.Empty; foreach (ListItem item in lstZones.Items) { if (item.Selected) { location += item.Value + "|"; } } info.Advertise_Params = location; info.Advertise_Embed = txtEmbed.Text.Trim(); try { AdvertiseDB.Update(info); lblStatusUpdate.Text = MiscUtility.UPDATE_SUCCESS; } catch { lblStatusUpdate.Text = MiscUtility.UPDATE_ERROR; } }