Exemple #1
0
        /// <summary>
        /// 表单提交
        /// </summary>
        protected void PageSave()
        {
            string tempId = Utils.GetFormValue("tempId");
            string data   = Utils.GetFormValue("data");
            IList <EyouSoft.Model.SysStructure.MSysCarTypeSeat> list = Newtonsoft.Json.JsonConvert.DeserializeObject <IList <EyouSoft.Model.SysStructure.MSysCarTypeSeat> >(data);


            Response.Clear();
            if (list != null && list.Count > 0)
            {
                EyouSoft.BLL.SysStructure.BSysCarType bll = new EyouSoft.BLL.SysStructure.BSysCarType();
                bool result = bll.UpdateSysCarType(tempId, list);
                if (result)
                {
                    Response.Write(UtilsCommons.AjaxReturnJson("1", "操作成功!"));
                }
                else
                {
                    Response.Write(UtilsCommons.AjaxReturnJson("0", "操作失败!"));
                }
            }
            else
            {
                Response.Write(UtilsCommons.AjaxReturnJson("0", "操作失败!"));
            }
            Response.End();
        }
Exemple #2
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        protected void PageInit()
        {
            IList <EyouSoft.Model.SysStructure.MSysCarTypeSeatNum> seatnumlist = new EyouSoft.BLL.SysStructure.BSysCarType().GetCarTypeSeatNumList();

            if (seatnumlist != null && seatnumlist.Count > 0)
            {
                this.ddlCarSeatNum.DataTextField  = "SeatNum";
                this.ddlCarSeatNum.DataValueField = "Id";
                this.ddlCarSeatNum.DataSource     = seatnumlist;
                this.ddlCarSeatNum.DataBind();
            }
            if (!string.IsNullOrEmpty(Id))
            {
                EyouSoft.Model.ComStructure.MComCarType model = new EyouSoft.BLL.ComStructure.BComCarType().GetModel(Id);
                this.txtCarType.Text  = model.CarTypeName;
                this.txtDescribe.Text = model.Desc;
                this.templateId.Value = model.TemplateId;
                this.oldseatnum.Value = model.SeatNum.ToString();

                IList <EyouSoft.Model.SysStructure.MSysCarTypeSeatNum> list = new EyouSoft.BLL.SysStructure.BSysCarType().GetCarTypeSeatNumList();
                if (list != null && list.Count > 0)
                {
                    foreach (var item in list)
                    {
                        if (item.SeatNum.ToString() == model.SeatNum.ToString())
                        {
                            this.ddlCarSeatNum.SelectedValue = item.Id.ToString();
                        }
                    }
                }
            }
        }
Exemple #3
0
        //绑定座位数
        protected void Bind_rptsetNumList()
        {
            IList <EyouSoft.Model.SysStructure.MSysCarTypeSeatNum> list = new EyouSoft.BLL.SysStructure.BSysCarType().GetCarTypeSeatNumList();

            if (list != null && list.Count > 0)
            {
                ddlSitCount.Items.Clear();
                ddlSitCount.Items.Add("请选择座位");

                for (int i = 0; i < list.Count; i++)
                {
                    ddlSitCount.Items.Add(new ListItem(list[i].SeatNum.ToString(), list[i].Id.ToString()));
                }
            }
            rpt_setNumList.DataSource = list;
            rpt_setNumList.DataBind();
        }
Exemple #4
0
 /// <summary>
 /// 根据模板编号获取座位列表
 /// </summary>
 /// <param name="strID">模板编号</param>
 public void Bindrpt_busBoxList(string strID)
 {
     EyouSoft.BLL.SysStructure.BSysCarType   bll   = new EyouSoft.BLL.SysStructure.BSysCarType();
     EyouSoft.Model.SysStructure.MSysCarType model = bll.GetCarTypeById(strID);
     if (model != null)
     {
         if (model.list != null && model.list.Count > 0)
         {
             rpt_busBoxList.DataSource = model.list;
             rpt_busBoxList.DataBind();
         }
         else
         {
             ret_SeatHtml(model.SeatNum);
         }
     }
 }
Exemple #5
0
        /// <summary>
        /// 下拉框的联动事件 获取默认的模板编号
        /// </summary>
        private void GetTemplateId()
        {
            string seatnum = Utils.GetQueryStringValue("newseatnum");
            int    id      = 0;
            IList <EyouSoft.Model.SysStructure.MSysCarTypeSeatNum> seatnumlist = new EyouSoft.BLL.SysStructure.BSysCarType().GetCarTypeSeatNumList();

            if (seatnumlist != null && seatnumlist.Count > 0)
            {
                foreach (var item in seatnumlist)
                {
                    if (item.SeatNum.ToString() == seatnum)
                    {
                        id = item.Id;
                    }
                }
            }
            IList <EyouSoft.Model.SysStructure.MSysCarType> list = new EyouSoft.BLL.SysStructure.BSysCarType().GetCarTypeList(id);

            AjaxResponse(UtilsCommons.AjaxReturnJson("1", "正确", list));
        }
Exemple #6
0
        private void PageInit()
        {
            string seatnum = Utils.GetQueryStringValue("seatnum");
            int    id      = 0;
            IList <EyouSoft.Model.SysStructure.MSysCarTypeSeatNum> seatnumlist = new EyouSoft.BLL.SysStructure.BSysCarType().GetCarTypeSeatNumList();

            if (seatnumlist != null && seatnumlist.Count > 0)
            {
                foreach (var item in seatnumlist)
                {
                    if (item.SeatNum.ToString() == seatnum)
                    {
                        id = item.Id;
                    }
                }
            }

            IList <EyouSoft.Model.SysStructure.MSysCarType> list = new EyouSoft.BLL.SysStructure.BSysCarType().GetCarTypeList(id);

            this.hideJsonData.Value = ("{\"data\":" + Newtonsoft.Json.JsonConvert.SerializeObject(list) + "}");
        }