コード例 #1
0
        /// <summary>
        /// 添加付款记录
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string AddCrowdFundRecord(HttpContext context)
        {
            CrowdFundRecord model = bllBase.ConvertRequestToModel <CrowdFundRecord>(new CrowdFundRecord());

            model.UserID     = bllBase.GetCurrUserID();
            model.RecordID   = int.Parse(bllBase.GetGUID(ZentCloud.BLLJIMP.TransacType.CommAdd));
            model.InsertDate = DateTime.Now;
            if (model.Amount <= 0)
            {
                resp.Msg = "金额需大于0";
                goto outoff;
            }
            if (bllBase.Add(model))
            {
                resp.Status = 1;
                resp.ExInt  = model.RecordID;
            }
            else
            {
                resp.Status = 0;
                resp.Msg    = "付款失败";
            }
outoff:
            return(Common.JSONHelper.ObjectToJson(resp));
        }
コード例 #2
0
ファイル: AdminHandler.ashx.cs プロジェクト: uvbs/mmp
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string AddCrowdFundInfo(HttpContext context)
        {
            CrowdFundInfo model = bllBase.ConvertRequestToModel <CrowdFundInfo>(new CrowdFundInfo());

            model.WebSiteOwner = bllBase.WebsiteOwner;
            if (bllBase.Add(model))
            {
                resp.Status = 1;
                resp.Msg    = "添加成功";
            }
            else
            {
                resp.Status = 0;
                resp.Msg    = "添加失败";
            }
outoff:
            return(Common.JSONHelper.ObjectToJson(resp));
        }
コード例 #3
0
        /// <summary>
        ///编辑
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string Update(HttpContext context)
        {
            var requestModel = bll.ConvertRequestToModel <BarCodeInfo>(new BarCodeInfo());
            var model        = bll.Get <BarCodeInfo>(string.Format("AutoId={0}", requestModel.AutoId));

            model.BarCode = requestModel.BarCode;
            if (string.IsNullOrEmpty(model.BarCode))
            {
                model.BarCode = GetCodeByFileName(model.ImageUrl);
            }
            model.ImageUrl  = requestModel.ImageUrl;
            model.CodeName  = requestModel.CodeName;
            model.ModelCode = requestModel.ModelCode;
            if (bll.Update(model))
            {
                apiResp.status = true;
            }
            else
            {
                apiResp.msg = "编辑失败";
            }
            return(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
        }