Esempio n. 1
0
        public int GenerateRechargeSysNo()
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>(); //new DataCommand("CustomerCheckTelIsExist");

            cmd.CreateCommand("GenerateRechargeSysNo");

            //DataCommand cmd = new DataCommand("GenerateRechargeSysNo");
            return(cmd.ExecuteScalar <int>());
        }
Esempio n. 2
0
        /// <summary>
        /// 流水号取订单号
        /// </summary>
        /// <param name="TradeNumber">流水号</param>
        /// <returns></returns>
        public int GetSOSysNoByTradeNumber(string TradeNumber)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("GetSOSysNoByTradeNumber");

            //DataCommand cmd = new DataCommand("GetSOSysNoByTradeNumber");
            cmd.SetParameter("@BankTrackingNumber", DbType.String, TradeNumber);
            return(cmd.ExecuteScalar <int>());
        }
Esempio n. 3
0
        public void UpdateRefundCallback(int refundSysNo, SOIncomeBillStatus sOIncomeBillStatus)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("UpdateRefundCallback");

            //DataCommand cmd = new DataCommand("UpdateRefundCallback");
            cmd.SetParameter("@RefundSysNo", DbType.Int32, refundSysNo);
            cmd.SetParameter("@SOIncomeBillStatus", DbType.Int32, sOIncomeBillStatus);
            cmd.ExecuteScalar <int>();
        }
Esempio n. 4
0
        public static bool Login(Model.Customer customer)
        {
            IDataCommand dataCommand = DataCommandManager.GetCommand("Customer_Login");

            dataCommand.SetParameter("@CustomerID", customer.CustomerID);
            dataCommand.SetParameter("@Password", customer.Password);

            int result = dataCommand.ExecuteScalar <int>();

            return(result == 1);
        }
Esempio n. 5
0
        /// <summary>
        /// 获取微信公共Token
        /// </summary>
        /// <returns></returns>
        public string GetWeiXinCommonToken()
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("GetWeiXinCommonToken");

            //DataCommand cmd = new DataCommand("GetWeiXinCommonToken");
            string result = cmd.ExecuteScalar <string>();

            return(result);
        }
Esempio n. 6
0
        /// <summary>
        /// 订单是否存在护理日志
        /// </summary>
        /// <param name="soSysNo"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        public int IsExsitNursingDaily(int soSysNo, int status)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("Order_IsExistsNursingDiary");

            //DataCommand cmd = new DataCommand("Order_IsExistsNursingDiary");
            cmd.SetParameter("@OrderSysNo", DbType.Int32, soSysNo);
            cmd.SetParameter("@NursingStatus", DbType.Int32, status);
            return(Convert.ToInt32(cmd.ExecuteScalar()));
        }
Esempio n. 7
0
        /// <summary>
        /// 检查商品评价是否存在
        /// </summary>
        /// <param name="sosysno"></param>
        /// <param name="productSysNo"></param>
        /// <returns></returns>
        public bool CheckProductCommentExists(int sosysno, int productSysNo)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("CheckProductCommentExists");

            //var cmd = new DataCommand("CheckProductCommentExists");
            cmd.SetParameter("@SOSysNo", DbType.Int32, sosysno);
            cmd.SetParameter("@ProductSysNo", DbType.Int32, productSysNo);
            return(cmd.ExecuteScalar <bool>());
        }
Esempio n. 8
0
        public int IsFavoriteProduct(int customerSysNo, int productSysNo)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("IsFavoriteProduct");

            //DataCommand cmd = new DataCommand("IsFavoriteProduct");
            cmd.SetParameter("@CustomerSysNo", DbType.Int32, customerSysNo);
            cmd.SetParameter("@ProductSysNo", DbType.Int32, productSysNo);

            return(Convert.ToInt32(cmd.ExecuteScalar()));
        }
Esempio n. 9
0
        //插入积分记录
        public int InsertCustomer_PointLog(Customer_PointLog entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>(); //new DataCommand("CustomerCheckTelIsExist");

            cmd.CreateCommand("InsertCustomer_PointLog");

            //DataCommand cmd = new DataCommand("InsertCustomer_PointLog");
            cmd.SetParameter <Customer_PointLog>(entity);
            int result = cmd.ExecuteScalar <int>();

            return(result);
        }
Esempio n. 10
0
        public int UpdateRechargeRequestStatus(int sysNo, RechargeStatus oldStatus, RechargeStatus newStatus)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>(); //new DataCommand("CustomerCheckTelIsExist");

            cmd.CreateCommand("UpdateRechargeRequestStatus");

            //DataCommand cmd = new DataCommand("UpdateRechargeRequestStatus");
            cmd.SetParameter("@SysNo", DbType.Int32, sysNo);
            cmd.SetParameter("@OldStatus", DbType.Int32, (Int32)oldStatus);
            cmd.SetParameter("@NewStatus", DbType.Int32, (Int32)newStatus);
            return(Convert.ToInt32(cmd.ExecuteScalar()));
        }
Esempio n. 11
0
        /// <summary>
        /// 领取优惠券
        /// </summary>
        public int ReceiveCoupons(CouponReceivingRecord entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("InsertCouponReceivingRecord");

            //DataCommand cmd = new DataCommand("InsertCouponReceivingRecord");
            cmd.SetParameter <CouponReceivingRecord>(entity);
            int result = cmd.ExecuteScalar <int>();

            return(result);
        }
Esempio n. 12
0
        /// <summary>
        /// 创建RMAItem信息
        /// </summary>
        public int InsertRMAItem(RMAItem entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("InsertRMAItem");

            //DataCommand cmd = new DataCommand("InsertRMAItem");
            cmd.SetParameter <RMAItem>(entity);
            int result = cmd.ExecuteScalar <int>();

            return(result);
        }
Esempio n. 13
0
        public bool CheckIpCount(string ip, int day, int count)
        {
            IDataCommand dataCommand = IocManager.Instance.Resolve <IDataCommand>();

            dataCommand.CreateCommand("CustomerCheckIpCount");
            //DataCommand dataCommand = new DataCommand("CustomerCheckIpCount");
            dataCommand.SetParameter("@IP", DbType.String, ip);
            dataCommand.SetParameter("@day", DbType.Int32, day);
            var result = dataCommand.ExecuteScalar();

            return(result != null && int.Parse(result.ToString()) >= count);
        }
Esempio n. 14
0
        /// <summary>
        /// 创建PromotionProduct信息
        /// </summary>
        public static int InsertPromotionProduct(PromotionProduct entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("InsertPromotionProduct");

            //DataCommand cmd = new DataCommand("InsertPromotionProduct");
            cmd.SetParameter <PromotionProduct>(entity);
            int result = cmd.ExecuteScalar <int>();

            return(result);
        }
Esempio n. 15
0
        /// <summary>
        /// 创建ShippingAddress信息
        /// </summary>
        public int InsertShippingAddress(ShippingAddress entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("InsertShippingAddress");

            //DataCommand cmd = new DataCommand("InsertShippingAddress");
            cmd.SetParameter <ShippingAddress>(entity);
            int result = cmd.ExecuteScalar <int>();

            return(result);
        }
Esempio n. 16
0
        public bool UpdateSOStatusToAbandon(int soSysNo, SOStatus soStatus, int userSysNo, string userName)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("UpdateSOStatusToAbandon");

            //DataCommand cmd = new DataCommand("UpdateSOStatusToAbandon");
            cmd.SetParameter("@SOSysNo", DbType.Int32, soSysNo);;
            cmd.SetParameter("@OldStatus", DbType.Int32, soStatus);
            cmd.SetParameter("@EditUserSysNo", DbType.Int32, userSysNo);
            cmd.SetParameter("@EditUserName", DbType.AnsiString, userName, 40);
            return(cmd.ExecuteScalar <int>() > 0);
        }
Esempio n. 17
0
        public CellPhoneConfirmTemp CreateCellPhoneConfirmTemp(CellPhoneConfirmTemp item)
        {
            IDataCommand dataCommand = IocManager.Instance.Resolve <IDataCommand>();

            dataCommand.CreateCommand("CustomerCreateCellPhoneConfirmTemp");

            //DataCommand datacommand = new DataCommand("CustomerCreateCellPhoneConfirmTemp");
            dataCommand.SetParameter <CellPhoneConfirmTemp>(item);
            int result = dataCommand.ExecuteScalar <int>();

            item.SysNo = result;
            return(item);
        }
Esempio n. 18
0
        public bool PhoneTimeInterval(string phoneNumber)
        {
            IDataCommand dataCommand = IocManager.Instance.Resolve <IDataCommand>();

            dataCommand.CreateCommand("CustomerPhoneTimeInterval");
            //DataCommand dataCommand = new DataCommand("CustomerPhoneTimeInterval");
            dataCommand.SetParameter("@phoneNumber", DbType.String, phoneNumber);
            object result = dataCommand.ExecuteScalar();

            if (result != null)
            {
                DateTime lastPhoneTime = DateTime.Parse(result.ToString());
                TimeSpan diff          = DateTime.Now - lastPhoneTime;
                return(diff.Days != 0 || diff.Hours != 0 || diff.Minutes >= 1);
            }
            return(true);
        }
Esempio n. 19
0
        public bool CheckTelIsExist(string phoneNumber)
        {
            IDataCommand dataCommand = IocManager.Instance.Resolve <IDataCommand>(); //new DataCommand("CustomerCheckTelIsExist");

            dataCommand.CreateCommand("CustomerCheckTelIsExist");
            dataCommand.SetParameter("@phoneNumber", DbType.String, phoneNumber);
            object result = dataCommand.ExecuteScalar();

            if (result != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }