protected void EBtnAdZone_Click(object sender, EventArgs e) { if (this.Page.IsValid) { adzone.ZoneName = this.TxtZoneName.Text; adzone.ZoneType = DataConverter.CLng(this.radlZonetype.SelectedValue); adzone.ShowType = DataConverter.CLng(this.RadlShowType.SelectedValue); adzone.DefaultSetting = DataConverter.CBool(this.RBLDefaultSetting.SelectedValue); adzone.ZoneSetting = this.GetZoneSetting(DataConverter.CBool(this.RBLDefaultSetting.SelectedValue)); adzone.Active = this.ChkActive.Checked; adzone.UpdateTime = DateTime.Now; adzone.ZoneHeight = DataConverter.CLng(this.TxtZoneHeight.Text.Trim()); adzone.ZoneWidth = DataConverter.CLng(this.TxtZoneWidth.Text.Trim()); adzone.UpdateTime = DateTime.Now; adzone.ZoneJSName = this.TxtZoneJSName.Text; adzone.ZoneIntro = this.TxtZoneIntro.Text; adzone.ZoneID = DataConverter.CLng(this.HdnZoneId.Value); if (adzone.ZoneID > 0) { if (B_ADZone.ADZone_Update(adzone)) { Response.Write("<script>alert('修改成功');window.document.location.href='ADZoneManage.aspx'</script>"); } } else { adzone.ZoneID = B_ADZone.ADZone_MaxID(); if (B_ADZone.ADZone_Add(adzone)) { Response.Write("<script>alert('添加成功');window.document.location.href='ADZoneManage.aspx'</script>"); } } } }
protected void EBtnAdZone_Click(object sender, EventArgs e) { if (this.Page.IsValid) { adzone.ZoneName = this.TxtZoneName.Text; adzone.ZoneType = DataConverter.CLng(this.radlZonetype.SelectedValue); adzone.ShowType = DataConverter.CLng(this.RadlShowType.SelectedValue); adzone.DefaultSetting = DataConverter.CBool(this.RBLDefaultSetting.SelectedValue); adzone.ZoneSetting = this.GetZoneSetting(DataConverter.CBool(this.RBLDefaultSetting.SelectedValue)); adzone.Active = this.ChkActive.Checked; adzone.UpdateTime = DateTime.Now; adzone.ZoneHeight = DataConverter.CLng(this.TxtZoneHeight.Text.Trim()); adzone.ZoneWidth = DataConverter.CLng(this.TxtZoneWidth.Text.Trim()); adzone.UpdateTime = DateTime.Now; adzone.ZoneJSName = this.TxtZoneJSName.Text; adzone.ZoneIntro = this.TxtZoneIntro.Text; adzone.ZoneID = DataConverter.CLng(this.HdnZoneId.Value); if (this.CheckApply.Checked == true) { adzone.Sales = 1; } else { adzone.Sales = 0; } if (adzone.ZoneID > 0) { if (B_ADZone.ADZone_Update(adzone)) { function.WriteSuccessMsg("修改成功", "ADZoneManage.aspx"); } } else { adzone.ZoneID = B_ADZone.ADZone_MaxID(); if (B_ADZone.ADZone_Add(adzone)) { function.WriteSuccessMsg("添加成功", "ADZoneManage.aspx"); } } } }
private string GetJSFileName() { return(DateTime.Today.Year.ToString() + DateTime.Today.Month.ToString().PadLeft(2, '0') + "/" + B_ADZone.ADZone_MaxID().ToString() + ".js"); }
public string GetJSFileName() { return(DateTime.Now.ToString("yyyyMM/") + B_ADZone.ADZone_MaxID() + ".js"); }