/// <summary>
        /// 插入新的二维码记录
        /// </summary>
        /// <returns></returns>
        public long AddNewQBCodeToTable(string qbCode, string qbCodeImagePath, string QBDetail)
        {
            string mainIdS = GetQueryString("mainId");
            long   mainId  = 0;

            if (mainIdS != string.Empty)
            {
                mainId = long.Parse(mainIdS);
            }

            long returnId = 0;

            Model.QB_CodeEL model = new Model.QB_CodeEL()
            {
                MainID   = mainId,
                QBCode   = qbCode,
                QBDetail = QBDetail,
                QBPath   = qbCodeImagePath,
                AssetID  = 0,
                PrintNum = 0,
                Valid    = 1
            };

            returnId = model.ExecNonQuery(1);

            return(returnId);
        }
        public void ProcessRequest(HttpContext context)
        {
            if (context.Request.Form["op"] != null)
            {
                string returnHtml = string.Empty;
                string op         = context.Request.Form["op"];
                switch (op)
                {
                case "deleteModel":    //删除标签模板
                {
                    Model.QB_ModelEL model = new Model.QB_ModelEL();
                    model.ID = long.Parse(context.Request.Form["id"]);
                    model.ExecNonQuery(3);
                    returnHtml = "success";
                }
                break;
                }
                context.Response.Write(returnHtml);
            }
            else
            {
                #region 修改标签的打印次数
                string qbCodeList = GetQBCode(context);
                long   mainId     = GetMainId(context);

                if (qbCodeList != string.Empty)
                {
                    try
                    {
                        if (qbCodeList.Substring(qbCodeList.Length - 1) == ",")
                        {
                            qbCodeList = qbCodeList.Remove(qbCodeList.Length - 1);
                        }

                        string[] codeList = qbCodeList.Split(new char[] { ',' });

                        Model.QB_CodeEL qbCode = new Model.QB_CodeEL();

                        foreach (string code in codeList)
                        {
                            qbCode.QBCode = code;
                            qbCode.MainID = mainId;
                            qbCode.ExecuteEL(55);

                            qbCode.PrintNum = qbCode.PrintNum + 1;

                            qbCode.ExecNonQuery(2);
                        }
                    }
                    catch { }
                }
                #endregion
            }
        }
        /// <summary>
        /// 插入新的二维码记录
        /// </summary>
        /// <returns></returns>
        public long AddNewQBCodeToTable(string qbCode, string qbCodeImagePath, string QBDetail)
        {
            long mainId = 0;

            long returnId = 0;

            Model.QB_CodeEL model = new Model.QB_CodeEL()
            {
                MainID = mainId,
                QBCode = qbCode,
                //QBDetail = QBDetail,//生成的空标签 暂时不给地址,在分配标签时生成地址
                QBPath   = qbCodeImagePath,
                AssetID  = 0,
                PrintNum = 0,
                Valid    = 1
            };

            returnId = model.ExecNonQuery(1);

            return(returnId);
        }