Пример #1
0
        /// <summary>
        /// 设置航期订单状态,返回1成功,其它失败
        /// </summary>
        /// <param name="dingDanId">订单编号</param>
        /// <param name="operatorId">操作员编号</param>
        /// <param name="status">订单状态</param>
        /// <param name="liuWeiDaoQiShiJian">留位到期时间</param>
        /// <returns></returns>
        public int SheZhiDingDanStatus(string dingDanId, string operatorId, EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus status, DateTime?liuWeiDaoQiShiJian)
        {
            if (string.IsNullOrEmpty(dingDanId) || string.IsNullOrEmpty(operatorId))
            {
                return(0);
            }
            if (!liuWeiDaoQiShiJian.HasValue)
            {
                liuWeiDaoQiShiJian = DateTime.Now;
            }

            int dalRetCode = dal.SheZhiDingDanStatus(dingDanId, operatorId, status, liuWeiDaoQiShiJian);

            if (status == Model.EnumType.YlStructure.HangQiDingDanStatus.成交 && dalRetCode == 1)
            {
                var dingdan = dal.GetDingDanInfo(dingDanId);
                if (dingdan != null)
                {
                    var m = new BLL.YlStructure.BHuiYuan().GetHuiYuanInfo(dingdan.XiaDanRenId);
                    if (m != null && !string.IsNullOrEmpty(m.ShouJi))
                    {
                        var content = "尊敬的会员" + m.XingMing + ":您预订的" + dingdan.MingCheng + "产品 出发日期:" + dingdan.RiQi.ToShortDateString() + ",预订人数:" + dingdan.RenShu + ",总价格:" + dingdan.JinE.ToString("F2") + "已经审核成功,请您进入订单中心进行支付!服务热线:400-665-9099【维诗达游轮网】";
                        EyouSoft.Toolkit.Utils.ProxySMS(m.ShouJi, content);
                    }
                }
            }
            return(dalRetCode);
        }
Пример #2
0
        /// <summary>
        /// 设置航期订单状态,返回1成功,其它失败
        /// </summary>
        /// <param name="dingDanId">订单编号</param>
        /// <param name="operatorId">操作员编号</param>
        /// <param name="status">订单状态</param>
        /// <param name="liuWeiDaoQiShiJian">留位到期时间</param>
        /// <returns></returns>
        public int SheZhiDingDanStatus(string dingDanId, string operatorId, EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus status, DateTime?liuWeiDaoQiShiJian)
        {
            if (!liuWeiDaoQiShiJian.HasValue)
            {
                liuWeiDaoQiShiJian = DateTime.Now;
            }
            DbCommand cmd = _db.GetStoredProcCommand("proc_YL_HangQiDingDan_SheZhiDingDanStatus");

            _db.AddInParameter(cmd, "@DingDanId", DbType.AnsiStringFixedLength, dingDanId);
            _db.AddInParameter(cmd, "@OperatorId", DbType.AnsiStringFixedLength, operatorId);
            _db.AddInParameter(cmd, "@DingDanStatus", DbType.Byte, status);
            _db.AddInParameter(cmd, "@LiuWeiDaoQiShiJian", DbType.DateTime, liuWeiDaoQiShiJian);
            _db.AddInParameter(cmd, "@IssueTime", DbType.DateTime, DateTime.Now);
            _db.AddOutParameter(cmd, "@RetCode", DbType.Int32, 4);

            int sqlExceptionCode = 0;

            try
            {
                DbHelper.RunProcedure(cmd, _db);
            }
            catch (System.Data.SqlClient.SqlException e)
            {
                sqlExceptionCode = 0 - e.Number;
            }

            if (sqlExceptionCode < 0)
            {
                return(sqlExceptionCode);
            }
            else
            {
                return(Convert.ToInt32(_db.GetParameterValue(cmd, "RetCode")));
            }
        }
Пример #3
0
        /// <summary>
        /// 设置状态
        /// </summary>
        void BaoCun()
        {
            string id = Utils.GetQueryStringValue("id");

            EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus state = (EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus)Utils.GetInt(Utils.GetFormValue("dingdanState"));

            MHangQiDingDanInfo model = new MHangQiDingDanInfo()
            {
                DingDanId = id, JinE = Utils.GetDecimal(Utils.GetFormValue(this.litZongJinE.UniqueID)), DingDanStatus = state, XiaDanRenId = SiteUserInfo.UserId, DingDanJiFen = Utils.GetDecimal(Utils.GetFormValue(txtDingDanJiFen.UniqueID))
            };
            var b      = new EyouSoft.BLL.YlStructure.BHangQiDingDan();
            var result = b.UpdateDingDan(model);

            if (result == 1)
            {
                result = b.SheZhiDingDanStatus(id, SiteUserInfo.UserId, state, null);
            }
            if (result == 1)
            {
                SavaCaoZuoBeiZhu(); RCWE(UtilsCommons.AjaxReturnJson("1", "保存成功"));
            }
            RCWE(UtilsCommons.AjaxReturnJson("0", "保存失败"));
        }