示例#1
0
 public void eidtelist(int richengid)
 {
     richeng = richengbll.GetModel(richengid);
     if (richeng != null)
     {
         this.rcName.Text      = richeng.rcName;
         this.beginDate.Text   = richeng.beginDate.ToString();
         this.endDate.Text     = richeng.endDate.ToString();
         this.rcPic.Text       = richeng.rcPic.ToString();
         this.remark.InnerText = richeng.remark;
         this.sort_id.Text     = richeng.sort_id.ToString();
     }
 }
        protected void save_qiudui_Click(object sender, EventArgs e)
        {
            BLL.wx_sjb_richeng   richengbll   = new BLL.wx_sjb_richeng();
            Model.wx_sjb_richeng richengmodel = new Model.wx_sjb_richeng();

            richengmodel = richengbll.GetModel(richengid);

            //if (string.Compare(this.endDate.Text.ToString(), richengmodel.beginDate.ToString()) < 0 || string.Compare(this.beginDate.Text.ToString(), richengmodel.createDate.ToString()) > 0)
            //{
            //    JscriptMsg("时间范围必须在日程日内!", "back", "Error");

            //    return;
            //}
            DateTime endDate   = Convert.ToDateTime(this.endDate.Text.Trim());
            DateTime?rcendDate = richengmodel.endDate;


            DateTime beginDate   = Convert.ToDateTime(this.endDate.Text.Trim());
            DateTime?rcbeginDate = richengmodel.beginDate;

            if (((endDate >= rcendDate) && (endDate <= rcbeginDate)) || ((beginDate >= rcendDate) && (beginDate <= rcbeginDate)))
            {
                JscriptMsg("时间范围必须在日程日内!", "back", "Error");

                return;
            }

            if (string.Compare(this.endDate.Text.ToString(), this.beginDate.Text.ToString()) < 0)
            {
                JscriptMsg("开始时间不能大于结束时间!", "back", "Error");
                return;
            }

            if (type == "edite")
            {
                bisai.id       = bisaiid;
                bisai.rcId     = richengid;
                bisai.bsPic    = this.bsPic.Text;
                bisai.bsRemark = this.bsRemark.InnerText;
                bisai.qd1Id    = Convert.ToInt32(this.qd1Id.SelectedValue);
                bisai.qd2Id    = Convert.ToInt32(this.qd2Id.SelectedValue);
                if (this.beginDate.Text != "")
                {
                    bisai.beginDate = Convert.ToDateTime(this.beginDate.Text);
                }
                if (this.endDate.Text != "")
                {
                    bisai.endDate = Convert.ToDateTime(this.endDate.Text);
                }
                if (this.jcBeginDate.Text != "")
                {
                    bisai.jcBeginDate = Convert.ToDateTime(this.jcBeginDate.Text);
                }
                if (this.jcEndDate.Text != "")
                {
                    bisai.jcEndDate = Convert.ToDateTime(this.jcEndDate.Text);
                }



                bisaibll.Update(bisai);

                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改球队设置,主键为" + bisaiid); //记录日志
                JscriptMsg("修改成功!", "bisai_list.aspx?id=" + richengid, "Success");
            }

            if (type == "add")
            {
                bisai.rcId     = richengid;
                bisai.bsPic    = this.bsPic.Text;
                bisai.bsRemark = this.bsRemark.InnerText;
                bisai.qd1Id    = Convert.ToInt32(this.qd1Id.SelectedValue);
                bisai.qd2Id    = Convert.ToInt32(this.qd2Id.SelectedValue);



                if (this.beginDate.Text != "")
                {
                    bisai.beginDate = Convert.ToDateTime(this.beginDate.Text);
                }
                if (this.endDate.Text != "")
                {
                    bisai.endDate = Convert.ToDateTime(this.endDate.Text);
                }



                if (this.jcBeginDate.Text != "")
                {
                    bisai.jcBeginDate = Convert.ToDateTime(this.jcBeginDate.Text);
                }
                if (this.jcEndDate.Text != "")
                {
                    bisai.jcEndDate = Convert.ToDateTime(this.jcEndDate.Text);
                }


                int id = bisaibll.Add(bisai);

                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "修改球队设置,主键为" + id); //记录日志
                JscriptMsg("增加成功!", "bisai_list.aspx?id=" + richengid, "Success");
            }
        }
示例#3
0
        protected void save_qiudui_Click(object sender, EventArgs e)
        {
            BLL.wx_sjb_richeng   richengbll   = new BLL.wx_sjb_richeng();
            Model.wx_sjb_richeng richengmodel = new Model.wx_sjb_richeng();

            richengmodel = richengbll.GetModel(richengid);
            DateTime beginDate = MyCommFun.Obj2DateTime(this.beginDate.Text.ToString());
            DateTime endDate   = MyCommFun.Obj2DateTime(this.endDate.Text.ToString());

            if (beginDate > endDate)
            {
                JscriptMsg("开始时间不能大于介绍时间!", "back", "Error");
                return;
            }

            if (richengmodel.beginDate <= beginDate && richengmodel.endDate >= endDate)
            {
            }
            else
            {
                JscriptMsg("时间范围必须在日程日内!", "back", "Error");
                return;
            }

            if (type == "edite")
            {
                bisai.id       = bisaiid;
                bisai.rcId     = richengid;
                bisai.bsPic    = this.bsPic.Text;
                bisai.bsRemark = this.bsRemark.InnerText;
                bisai.qd1Id    = Convert.ToInt32(this.qd1Id.SelectedValue);
                bisai.qd2Id    = Convert.ToInt32(this.qd2Id.SelectedValue);
                if (this.beginDate.Text != "")
                {
                    bisai.beginDate = Convert.ToDateTime(this.beginDate.Text);
                }
                if (this.endDate.Text != "")
                {
                    bisai.endDate = Convert.ToDateTime(this.endDate.Text);
                }
                if (this.jcBeginDate.Text != "")
                {
                    bisai.jcBeginDate = Convert.ToDateTime(this.jcBeginDate.Text);
                }
                if (this.jcEndDate.Text != "")
                {
                    bisai.jcEndDate = Convert.ToDateTime(this.jcEndDate.Text);
                }



                bisaibll.Update(bisai);

                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改球队设置,主键为" + bisaiid); //记录日志
                JscriptMsg("修改成功!", "bisai_list.aspx?id=" + richengid, "Success");
            }

            if (type == "add")
            {
                bisai.rcId     = richengid;
                bisai.bsPic    = this.bsPic.Text;
                bisai.bsRemark = this.bsRemark.InnerText;
                bisai.qd1Id    = Convert.ToInt32(this.qd1Id.SelectedValue);
                bisai.qd2Id    = Convert.ToInt32(this.qd2Id.SelectedValue);



                if (this.beginDate.Text != "")
                {
                    bisai.beginDate = Convert.ToDateTime(this.beginDate.Text);
                }
                if (this.endDate.Text != "")
                {
                    bisai.endDate = Convert.ToDateTime(this.endDate.Text);
                }



                if (this.jcBeginDate.Text != "")
                {
                    bisai.jcBeginDate = Convert.ToDateTime(this.jcBeginDate.Text);
                }
                if (this.jcEndDate.Text != "")
                {
                    bisai.jcEndDate = Convert.ToDateTime(this.jcEndDate.Text);
                }


                int id = bisaibll.Add(bisai);

                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "修改球队设置,主键为" + id); //记录日志
                JscriptMsg("增加成功!", "bisai_list.aspx?id=" + richengid, "Success");
            }
        }
示例#4
0
        protected void save_qiudui_Click(object sender, EventArgs e)
        {
            BLL.wx_sjb_richeng richengbll = new BLL.wx_sjb_richeng();
            Model.wx_sjb_richeng richengmodel = new Model.wx_sjb_richeng();

            richengmodel = richengbll.GetModel(richengid);

            //if (string.Compare(this.endDate.Text.ToString(), richengmodel.beginDate.ToString()) < 0 || string.Compare(this.beginDate.Text.ToString(), richengmodel.createDate.ToString()) > 0)
            //{
            //    JscriptMsg("时间范围必须在日程日内!", "back", "Error");

            //    return;
            //}
            DateTime endDate = Convert.ToDateTime(this.endDate.Text.Trim());
            DateTime? rcendDate = richengmodel.endDate;

            DateTime beginDate = Convert.ToDateTime(this.endDate.Text.Trim());
            DateTime? rcbeginDate = richengmodel.beginDate;

            if (((endDate >= rcendDate) && (endDate <= rcbeginDate)) || ((beginDate >= rcendDate) && (beginDate <= rcbeginDate)))
            {

                  JscriptMsg("时间范围必须在日程日内!", "back", "Error");

                   return;
            }

            if (string.Compare(this.endDate.Text.ToString(), this.beginDate.Text.ToString()) < 0)
            {
                JscriptMsg("开始时间不能大于结束时间!", "back", "Error");
                return;
            }

            if (type == "edite")
            {
                bisai.id = bisaiid;
                bisai.rcId = richengid;
                bisai.bsPic = this.bsPic.Text;
                bisai.bsRemark = this.bsRemark.InnerText;
                bisai.qd1Id = Convert.ToInt32( this.qd1Id.SelectedValue);
                bisai.qd2Id = Convert.ToInt32(this.qd2Id.SelectedValue);
                if (this.beginDate.Text!="")
                {
                bisai.beginDate = Convert.ToDateTime( this.beginDate.Text);
                }
                if (this.endDate.Text!="")
                {
                bisai.endDate = Convert.ToDateTime( this.endDate.Text);
                }
                if (this.jcBeginDate.Text!="")
                {
                    bisai.jcBeginDate= Convert.ToDateTime( this.jcBeginDate.Text);
                }
                if (this.jcEndDate.Text!="")
                {
                bisai.jcEndDate =Convert.ToDateTime( this.jcEndDate.Text);
                }

                bisaibll.Update(bisai);

                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改球队设置,主键为" + bisaiid); //记录日志
                JscriptMsg("修改成功!", "bisai_list.aspx?id=" + richengid, "Success");

            }

            if(type=="add")
            {

                bisai.rcId = richengid;
                bisai.bsPic = this.bsPic.Text;
                bisai.bsRemark = this.bsRemark.InnerText;
                bisai.qd1Id = Convert.ToInt32(this.qd1Id.SelectedValue);
                bisai.qd2Id = Convert.ToInt32(this.qd2Id.SelectedValue);

                if (this.beginDate.Text != "")
                {
                    bisai.beginDate = Convert.ToDateTime(this.beginDate.Text);
                }
                if (this.endDate.Text != "")
                {
                    bisai.endDate = Convert.ToDateTime(this.endDate.Text);
                }

                if (this.jcBeginDate.Text != "")
                {
                    bisai.jcBeginDate = Convert.ToDateTime(this.jcBeginDate.Text);
                }
                if (this.jcEndDate.Text != "")
                {
                    bisai.jcEndDate = Convert.ToDateTime(this.jcEndDate.Text);
                }

                int id = bisaibll.Add(bisai);

                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "修改球队设置,主键为" + id); //记录日志
                JscriptMsg("增加成功!", "bisai_list.aspx?id=" + richengid , "Success");

            }
        }