/// <summary> /// ���չ����Ϣ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, EventArgs e) { XYECOM.Business.Show showBLL = new XYECOM.Business.Show(); XYECOM.Model.ShowInfo showinfo = new XYECOM.Model.ShowInfo(); showinfo.Infotitle = this.txtname.Text; //չ������ showinfo.Typeid = XYECOM.Core.MyConvert.GetInt32(this.hidptid.Value); //չ����� if (this.lbcontent.Value == "") showinfo.Contents = "������Ϣ"; else showinfo.Contents = this.lbcontent.Value; //չ����Ϣ showinfo.BeginTime = this.bgdate.Value; //��Ļʱ�� showinfo.EndTime = this.egdate.Value;//��Ļʱ�� showinfo.District = this.txtshowaddress.Text; //չ��ص� showinfo.Site = this.txtshowchang.Text; //չ�᳡�� showinfo.Sponsor = this.txtdanwei.Text; //���쵥λ if (this.txtundertakepost.Text == "") showinfo.Undertake = "������Ϣ"; else showinfo.Undertake = this.txtundertakepost.Text; //�а쵥λ if (this.txtxieban.Text == "") showinfo.Coorganizor = "������Ϣ"; else showinfo.Coorganizor = this.txtxieban.Text; //Э�쵥λ if (this.txtshowsuoppt.Text =="") showinfo.Sustain = "������Ϣ"; else showinfo.Sustain = this.txtshowsuoppt.Text; //֧�ֵ�λ showinfo.Sycle = this.showzhouqi.SelectedValue; //չ������ showinfo.Type = this.showtype.Text; // չ������ if (this.txtshowhomepage.Text == "") showinfo.URL = "������Ϣ"; else showinfo.URL = this.txtshowhomepage.Text; //չ����ַ if (this.txtshowareaunit.Text == "") showinfo.Area = "������Ϣ"; else showinfo.Area = this.txtshowareaunit.Text; //���������λ if (this.txtshowprice.Text == "") showinfo.UnitPrice = 0; else showinfo.UnitPrice = XYECOM.Core.MyConvert.GetInt32(this.txtshowprice.Text); //���ص��� if (this.txtshowunit.Text == "") showinfo.LeastRation = 0; else showinfo.LeastRation = XYECOM.Core.MyConvert.GetInt32(this.txtshowunit.Text); //�������� if (this.txtshowarea.Text == "") showinfo.AreaTotal = 0; else showinfo.AreaTotal = XYECOM.Core.MyConvert.GetInt32(this.txtshowarea.Text); //չλ������� long id = 0; int result = 0; if (XYECOM.Core.XYRequest.GetQueryString("iswhich").Equals("1")) { XYECOM.Model.ShowInfo newinfo = new XYECOM.Model.ShowInfo(); newinfo = showBLL.GetItem(XYECOM.Core.XYRequest.GetQueryInt64("infoid")); showinfo.IsCommend = newinfo.IsCommend; showinfo.HtmlPage = newinfo.HtmlPage; showinfo.Id = XYECOM.Core.MyConvert.GetInt32(XYECOM.Core.XYRequest.GetQueryString("infoid")); id = showinfo.Id; result = showBLL.Update(showinfo); } else { result = showBLL.Insert(showinfo, out id); } if (result >= 0) { //�ϴ�ͼƬ UploadFile1.InfoID = id; UploadFile1.Update(); Response.Redirect("ShowInfoList.aspx"); } else { Alert("���ʧ�ܣ���������ӣ�"); } }