Beispiel #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();
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Bind_rptsetNumList();
            Bind_rpttempList();
            string strQuery  = Utils.GetQueryStringValue("dotype");
            int    strId     = Utils.GetInt(Utils.GetQueryStringValue("id"));
            string strtempid = Utils.GetQueryStringValue("tempid");
            int    intTemlId = Utils.GetInt(Utils.GetQueryStringValue("seatId"));

            switch (strQuery)
            {
            case "delSeatNum":
                int resultSeat = 1;
                resultSeat = bll.DeleteSysCarTypeSeatNum(strId);
                if (resultSeat == 1)
                {
                    MessageBox.ResponseScript(this, "alert('删除成功!');");
                    Response.Redirect("cartemp.aspx");
                }
                else if (resultSeat == 0)
                {
                    MessageBox.ResponseScript(this, "alert('删除失败!');");
                }
                else
                {
                    MessageBox.ResponseScript(this, "alert('模板已经被使用,请先删除使用项!');");
                }

                break;

            case "delTemp":
                int resultTemp = 1;
                resultTemp = bll.DeleteSysCarTypeTempLate(strtempid);
                if (resultTemp == 1)
                {
                    MessageBox.ResponseScript(this, "alert('删除成功!');");
                    Response.Redirect("cartemp.aspx");
                }
                else if (resultTemp == 0)
                {
                    MessageBox.ResponseScript(this, "alert('删除失败!');");
                }
                else
                {
                    MessageBox.ResponseScript(this, "alert('模板已经被使用,请先删除使用项!');");
                }
                break;

            case "setDefault":
                bll.UpdateSysCarType(intTemlId, strtempid);
                Response.Redirect("cartemp.aspx");

                break;

            default:
                break;
            }
        }