示例#1
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool AddSysDistrict(Eyousoft_yhq.Model.MSysDistrict model)
 {
     if (model != null && model.ProvinceId > 0 && model.CityId > 0 && !string.IsNullOrEmpty(model.Name))
         return dal.AddSysDistrict(model);
     else
         return false;
 }
示例#2
0
文件: Order.cs 项目: uwitec/O2O
 /// <summary>
 ///  增加一条数据
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int Add(Eyousoft_yhq.Model.Order model)
 {
     model.OrderID = Guid.NewGuid().ToString();
     if (string.IsNullOrEmpty(model.MemberID) ||
         string.IsNullOrEmpty(model.ProductID)) return 0;
     return dal.Add(model);
 }
示例#3
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool AddSysProvince(Eyousoft_yhq.Model.MSysProvince model)
 {
     if (model != null && !string.IsNullOrEmpty(model.Name))
         return dal.AddSysProvince(model);
     else
         return false;
 }
示例#4
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool AddSysCountry(Eyousoft_yhq.Model.MSysCountry model)
 {
     if (model != null && !string.IsNullOrEmpty(model.CnName))
         return dal.AddSysCountry(model);
     else
         return false;
 }
示例#5
0
文件: Order.cs 项目: uwitec/O2O
        /// <summary>
        ///  增加一条数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int Add(Eyousoft_yhq.Model.Order model)
        {
            DbCommand cmd = this._db.GetStoredProcCommand("proc_Order_Add");
            this._db.AddInParameter(cmd, "OrderID", DbType.AnsiStringFixedLength, model.OrderID);
            this._db.AddInParameter(cmd, "ProductID", DbType.AnsiStringFixedLength, model.ProductID);
            this._db.AddOutParameter(cmd, "OrderCode", DbType.AnsiStringFixedLength, 255);
            this._db.AddInParameter(cmd, "MemberID", DbType.AnsiStringFixedLength, model.MemberID);
            this._db.AddInParameter(cmd, "MemberName", DbType.String, model.MemberName);
            this._db.AddInParameter(cmd, "MemberTel", DbType.String, model.MemberTel);
            this._db.AddInParameter(cmd, "MemberSex", DbType.Byte, (int)model.MemberSex);
            this._db.AddInParameter(cmd, "OrderState", DbType.Byte, (int)model.OrderState);
            this._db.AddInParameter(cmd, "PayState", DbType.Byte, (int)model.PayState);
            this._db.AddInParameter(cmd, "IsCheck", DbType.AnsiStringFixedLength, this.GetBooleanToStr(model.IsCheck));
            this._db.AddInParameter(cmd, "ConfirmCode", DbType.String, model.ConfirmCode);
            this._db.AddInParameter(cmd, "OrderPrice", DbType.Decimal, model.OrderPrice);
            this._db.AddInParameter(cmd, "PeopleNum", DbType.Int32, model.PeopleNum);
            this._db.AddInParameter(cmd, "Remark", DbType.String, model.Remark);

            this._db.AddOutParameter(cmd, "Result", DbType.Int32, 4);
            _db.AddInParameter(cmd, "WeiDianId", DbType.AnsiStringFixedLength, model.WeiDianId);

            DbHelper.RunProcedureWithResult(cmd, this._db);
            model.OrderCode = this._db.GetParameterValue(cmd, "OrderCode").ToString();
            return Convert.ToInt32(this._db.GetParameterValue(cmd, "Result"));
        }
示例#6
0
文件: DMember.cs 项目: uwitec/O2O
        /// <summary>
        /// 注册用户/添加用户
        /// </summary>
        /// <param name="model">用户实体/管理员实体</param>
        /// <returns></returns>
        public bool Add(Eyousoft_yhq.Model.User model)
        {
            StringBuilder strSqlExists = new StringBuilder();
            strSqlExists.Append("select count(1) from tbl_Member");
            strSqlExists.Append(" where PromotionCode=@PollCode ");

            DbCommand cmdExists = this._db.GetSqlStringCommand(strSqlExists.ToString());
            this._db.AddInParameter(cmdExists, "PollCode", System.Data.DbType.String, model.PollCode);

            if (!DbHelper.Exists(cmdExists, this._db))
            {
                model.PollCode = "";
            }

            StringBuilder strSql = new StringBuilder();

            strSql.Append("  INSERT INTO tbl_Member([UserID],[UserName],[UserPwd],[ContactName],[ContactSex],[Remark],[IssueTime],[PollCode],[IsAgent],[YuE]  )		VALUES (@UserID,@UserName,@UserPwd,@ContactName,@ContactSex,@Remark,@IssueTime,@PollCode,@IsAgent,@YuE) ");

            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());
            this._db.AddInParameter(cmd, "UserID", System.Data.DbType.AnsiStringFixedLength, model.UserID);
            this._db.AddInParameter(cmd, "UserName", System.Data.DbType.String, model.UserName);
            this._db.AddInParameter(cmd, "UserPwd", System.Data.DbType.String, model.UserPwd);
            this._db.AddInParameter(cmd, "ContactName", System.Data.DbType.String, model.ContactName);
            this._db.AddInParameter(cmd, "ContactSex", System.Data.DbType.Byte, (int)model.ContactSex);
            this._db.AddInParameter(cmd, "Remark", System.Data.DbType.String, model.Remark);
            this._db.AddInParameter(cmd, "IssueTime", System.Data.DbType.DateTime, model.IssueTime);
            this._db.AddInParameter(cmd, "PollCode", System.Data.DbType.String, model.PollCode);
            this._db.AddInParameter(cmd, "IsAgent", System.Data.DbType.Byte, GetBooleanToStr(model.IsAgent));
            this._db.AddInParameter(cmd, "YuE", System.Data.DbType.Decimal, model.YuE);

            return DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false;
        }
示例#7
0
文件: Member.cs 项目: uwitec/O2O
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Eyousoft_yhq.Model.User model)
        {
            model.UserID = Guid.NewGuid().ToString();
            bool result = dal.Add(model);
            if (result) new Eyousoft_yhq.BLL.Login().isLogin(model.UserName, model.UserPwd);

            return result;
        }
示例#8
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool AddSysCountry(Eyousoft_yhq.Model.MSysCountry model)
 {
     string StrSql = "INSERT INTO tbl_SysCountry(EnName,Zones,CnName) VALUES(@EnName,@Zones,@CnName)";
     DbCommand dc = this._db.GetSqlStringCommand(StrSql);
     this._db.AddInParameter(dc, "EnName", DbType.String, model.EnName);
     this._db.AddInParameter(dc, "CnName", DbType.String, model.CnName);
     this._db.AddInParameter(dc, "Zones", DbType.Int32, model.Zones);
     return DbHelper.ExecuteSql(dc, this._db) > 0 ? true : false;
 }
示例#9
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool AddSysDistrict(Eyousoft_yhq.Model.MSysDistrict model)
 {
     string StrSql = "INSERT INTO tbl_SysDistrict(Name,ProvinceId,CityId,HeaderLetter) VALUES(@Name,@ProvinceId,@CityId,@HeaderLetter)";
     DbCommand dc = this._db.GetSqlStringCommand(StrSql);
     this._db.AddInParameter(dc, "Name", DbType.String, model.Name);
     this._db.AddInParameter(dc, "ProvinceId", DbType.Int32, model.ProvinceId);
     this._db.AddInParameter(dc, "CityId", DbType.Int32, model.CityId);
     this._db.AddInParameter(dc, "HeaderLetter", DbType.String, model.HeaderLetter);
     return DbHelper.ExecuteSql(dc, this._db) > 0 ? true : false;
 }
示例#10
0
文件: GYSticket.cs 项目: uwitec/O2O
        /// <summary>
        /// 返回分页列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="RecordCount"></param>
        /// <param name="serModel"></param>
        /// <returns></returns>
        public IList<Eyousoft_yhq.Model.GYSticket> GetList(int PageSize, int PageIndex, ref int RecordCount, Eyousoft_yhq.Model.GysTicketSer serModel)
        {
            IList<Eyousoft_yhq.Model.GYSticket> list = new List<Eyousoft_yhq.Model.GYSticket>();

            string tableName = "GYSTicket";
            string fileds = "  ID  , CusName  , CusSex  , CusMob  , PlaneTicket  , IssueTime  , Remark, OpertorID,OrderState,TicketState ";
            string orderByString = "IssueTime desc";

            StringBuilder query = new StringBuilder();
            query.Append(" 1=1  ");

            if (serModel != null)
            {
                if (!string.IsNullOrEmpty(serModel.OpertorID))
                {
                    query.AppendFormat(" and  OpertorID =  '{0}' ", serModel.OpertorID);
                }
                if (!string.IsNullOrEmpty(serModel.cusName))
                {
                    query.AppendFormat(" and  CusName  LIKE  '%{0}%' ", serModel.cusName);
                }
                if (!string.IsNullOrEmpty(serModel.cusMob))
                {
                    query.AppendFormat(" and  CusMob  LIKE  '%{0}%' ", serModel.cusMob);
                }
                if (!string.IsNullOrEmpty(serModel.tickNO))
                {
                    query.AppendFormat(" and  PlaneTicket  LIKE  '%{0}%' ", serModel.tickNO);
                }
            }

            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {
                while (dr.Read())
                {

                    Eyousoft_yhq.Model.GYSticket model = new Eyousoft_yhq.Model.GYSticket();
                    model.ID = dr.GetString(dr.GetOrdinal("ID")); ;
                    model.CusName = dr.GetString(dr.GetOrdinal("CusName"));
                    model.CusSex = (Eyousoft_yhq.Model.sexType)dr.GetByte(dr.GetOrdinal("CusSex"));
                    model.CusMob = dr.GetString(dr.GetOrdinal("CusMob"));
                    model.PlaneTicket = dr.GetString(dr.GetOrdinal("PlaneTicket"));
                    model.IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.Remark = dr.GetString(dr.GetOrdinal("Remark"));
                    model.OpertorID = dr.GetString(dr.GetOrdinal("OpertorID"));
                    model.orderState = (Eyousoft_yhq.Model.TickOrderState)dr.GetByte(dr.GetOrdinal("OrderState"));
                    model.payState = (Eyousoft_yhq.Model.PaymentState)dr.GetByte(dr.GetOrdinal("TicketState"));

                    list.Add(model);
                }
            }
            return list;
        }
示例#11
0
文件: Product.cs 项目: uwitec/O2O
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Eyousoft_yhq.Model.Product model)
 {
     model.ProductID = Guid.NewGuid().ToString();
     if (model.AttachList != null && model.AttachList.Count > 0)
     {
         for (int i = 0; i < model.AttachList.Count; i++)
         {
             model.AttachList[i].ItemId = model.ProductID;
         }
     }
     return dal.Add(model);
 }
示例#12
0
文件: DYuYue.cs 项目: uwitec/O2O
        /// <summary>
        ///  增加一条数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int Add(Eyousoft_yhq.Model.MYuYue model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("INSERT INTO tbl_YuYue (YYRoute ,YYName ,YYMobile ,YYInfo ) VALUES (@YYRoute ,@YYName ,@YYMobile ,@YYInfo )");
            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());
            this._db.AddInParameter(cmd, "YYRoute", System.Data.DbType.String, model.YYRoute);
            this._db.AddInParameter(cmd, "YYName", System.Data.DbType.String, model.YYRoute);
            this._db.AddInParameter(cmd, "YYMobile", System.Data.DbType.String, model.YYMobile);
            this._db.AddInParameter(cmd, "YYInfo", System.Data.DbType.String, model.YYInfo);

            return DbHelper.ExecuteSql(cmd, this._db);
        }
示例#13
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool AddSysCity(Eyousoft_yhq.Model.MSysCity model)
 {
     string StrSql = "INSERT INTO tbl_SysCity(ProvinceId,Name,CenterCityId,HeaderLetter,IsSite,DomainName,IsEnabled) VALUES(@ProvinceId,@Name,@CenterCityId,@HeaderLetter,@IsSite,@DomainName,@IsEnabled)";
     DbCommand dc = this._db.GetSqlStringCommand(StrSql);
     this._db.AddInParameter(dc, "ProvinceId", DbType.Int32, model.ProvinceId);
     this._db.AddInParameter(dc, "Name", DbType.String, model.Name);
     this._db.AddInParameter(dc, "CenterCityId", DbType.Int32, model.CenterCityId);
     this._db.AddInParameter(dc, "HeaderLetter", DbType.String, model.HeaderLetter);
     this._db.AddInParameter(dc, "IsSite", DbType.AnsiStringFixedLength, this.GetBooleanToStr(model.IsSite));
     this._db.AddInParameter(dc, "DomainName", DbType.String, model.DomainName);
     this._db.AddInParameter(dc, "IsEnabled", DbType.AnsiStringFixedLength, this.GetBooleanToStr(model.IsEnabled));
     return DbHelper.ExecuteSql(dc, this._db) > 0 ? true : false;
 }
示例#14
0
文件: DCustomMsg.cs 项目: uwitec/O2O
        /// <summary>
        ///  增加一条数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int Add(Eyousoft_yhq.Model.CustomMsg model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("INSERT INTO tbl_Recommend (OpenId ,NickName ,Sex ,CommendInfo ) VALUES (@OpenId ,@NickName ,@Sex ,@CommendInfo )");

            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());
            this._db.AddInParameter(cmd, "OpenId", System.Data.DbType.String, model.OpenId);
            this._db.AddInParameter(cmd, "NickName", System.Data.DbType.String, model.NickName);
            this._db.AddInParameter(cmd, "Sex", System.Data.DbType.String, model.Sex);
            this._db.AddInParameter(cmd, "CommendInfo", System.Data.DbType.String, model.CommendInfo);

            return DbHelper.ExecuteSql(cmd, this._db);
        }
示例#15
0
文件: DPlanIns.cs 项目: uwitec/O2O
        /// <summary>
        /// 获取保险编号
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IList<MPlanIns> GetList(int PageSize, int PageIndex, ref int RecordCount, Eyousoft_yhq.Model.MPlanInsSer serModel)
        {
            IList<Eyousoft_yhq.Model.MPlanIns> list = new List<Eyousoft_yhq.Model.MPlanIns>();

            string tableName = "tbl_PlantIns";

            string fileds = " * ";

            string orderByString = " IssueTime desc ";

            StringBuilder query = new StringBuilder();
            query.Append(" 1=1");

            if (serModel != null)
            {
                if (!string.IsNullOrEmpty(serModel.OperatorID))
                {
                    query.AppendFormat(" and  OperatorID='{0}'  ", serModel.OperatorID);
                }

            }

            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {

                while (dr.Read())
                {
                    Eyousoft_yhq.Model.MPlanIns model = new Eyousoft_yhq.Model.MPlanIns();

                    model.ID = dr.GetInt32(dr.GetOrdinal("ID"));
                    model.InsMoney = dr.GetDecimal(dr.GetOrdinal("InsMoney"));
                    model.InsName = dr.GetString(dr.GetOrdinal("InsName"));
                    model.InsNO = dr.GetString(dr.GetOrdinal("InsNO"));
                    model.IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.LinkAddress = dr.GetString(dr.GetOrdinal("LinkAddress"));
                    model.LinkMail = dr.GetString(dr.GetOrdinal("LinkMail"));
                    model.LinkTel = dr.GetString(dr.GetOrdinal("LinkTel"));
                    model.OperatorID = dr.GetString(dr.GetOrdinal("OperatorID"));
                    model.OperatorName = dr.GetString(dr.GetOrdinal("OperatorName"));
                    model.OrderCode = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OrderID = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.PlantID = dr.GetString(dr.GetOrdinal("PlantID"));
                    model.PolicTor = dr.GetString(dr.GetOrdinal("PolicTor"));
                    model.State = (InsState)dr.GetByte(dr.GetOrdinal("State"));

                    list.Add(model);
                }
            }
            return list;
        }
示例#16
0
文件: Comment.cs 项目: uwitec/O2O
        /// <summary>
        /// 留言
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Add(Eyousoft_yhq.Model.Comment model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.AppendFormat("INSERT INTO  tbl_Comment ( ProductID , CommentID , PeopleID , CommentText, CheckState , IssueTime )	VALUES ( @ProductID , @CommentID , @PeopleID , @CommentText, 0 , @IssueTime )");

            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());
            this._db.AddInParameter(cmd, "ProductID", System.Data.DbType.AnsiStringFixedLength, model.ProductID);
            this._db.AddInParameter(cmd, "CommentID", System.Data.DbType.String, model.CommentID);
            this._db.AddInParameter(cmd, "PeopleID", System.Data.DbType.String, model.PeopleID);
            this._db.AddInParameter(cmd, "CommentText", System.Data.DbType.String, model.CommentText);
            //this._db.AddInParameter(cmd, "CheckState", System.Data.DbType.String, model.ContactSex);
            this._db.AddInParameter(cmd, "IssueTime", System.Data.DbType.String, model.IssueTime);

            return DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false;
        }
示例#17
0
文件: DWeiDian.cs 项目: uwitec/O2O
        /// <summary>
        /// 获取微店产品信息集合
        /// </summary>
        /// <param name="weiDianId">微店编号</param>
        /// <param name="chaXun">查询</param>
        /// <returns></returns>
        public IList<Eyousoft_yhq.Model.MWeiDianChanPinInfo> GetWeiDianChanPins(string weiDianId,Eyousoft_yhq.Model.MWeiDianChanPinChaXunInfo chaXun)
        {
            IList<Eyousoft_yhq.Model.MWeiDianChanPinInfo> items = new List<Eyousoft_yhq.Model.MWeiDianChanPinInfo>();
            var sql = new StringBuilder();
            sql.AppendFormat("SELECT * FROM view_WeiDian_ChanPin WHERE [WeiDianId]='{0}' ", weiDianId);

            if (chaXun != null)
            {
                if (chaXun.ChanPinLeiXing.HasValue)
                {
                    sql.AppendFormat(" AND ChanPinLeiXing={0} ", chaXun.ChanPinLeiXing.Value);
                }

                if (!string.IsNullOrEmpty(chaXun.ChanPinName))
                {
                    sql.AppendFormat(" AND ChanPinName LIKE '%{0}%' ", chaXun.ChanPinName);
                }
            }

            sql.AppendFormat(" ORDER BY IssueTime DESC ");

            var cmd = _db.GetSqlStringCommand(sql.ToString());

            using (var rdr = DbHelper.ExecuteReader(cmd, _db))
            {
                while (rdr.Read())
                {
                    var item = new Eyousoft_yhq.Model.MWeiDianChanPinInfo();
                    item.ChanPinId = rdr["ChanPinId"].ToString();
                    item.ChanPinName = rdr["ChanPinName"].ToString();
                    item.ChanPinTuPianFilepath = rdr["ChanPinTuPianFilepath"].ToString();
                    item.GuanXiId = rdr.GetInt32(rdr.GetOrdinal("IdentityId"));
                    item.HuiYuanId = rdr["HuiYuanId"].ToString();
                    item.TianJiaTime = rdr.GetDateTime(rdr.GetOrdinal("IssueTime"));
                    item.WeiDianId = rdr["WeiDianId"].ToString();

                    item.ShiChangJiaGe = rdr.GetDecimal(rdr.GetOrdinal("ShiChangJiaGe"));
                    item.JieSuanJiaGe = rdr.GetDecimal(rdr.GetOrdinal("JieSuanJiaGe"));
                    if (!rdr.IsDBNull(rdr.GetOrdinal("ChuTuanRiQi"))) item.ChuTuanRiQi = rdr.GetDateTime(rdr.GetOrdinal("ChuTuanRiQi"));
                    item.IsTianTianFaTuan = rdr["IsTianTianFaTuan"].ToString() == "1";
                    item.PingLunJiShu = rdr.GetInt32(rdr.GetOrdinal("PingLunJiShu"));

                    items.Add(item);
                }
            }

            return items;
        }
示例#18
0
文件: SendMsg.cs 项目: uwitec/O2O
        /// <summary>
        /// 添加发送信息
        /// </summary>
        /// <param name="model">发送信息实体</param>
        /// <returns></returns>
        public bool Add(Eyousoft_yhq.Model.SendMSG model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" INSERT INTO  tbl_SendMSG  (sendNum,SendText,issuetime,ProductID,FavourCode) 	VALUES (@sendNum,@SendText,@issuetime,@ProductID,@FavourCode) ;UPDATE [tbl_KV]   SET  v= v - @minusNum WHERE k='MsgNumber' ");

            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());
            this._db.AddInParameter(cmd, "sendNum", System.Data.DbType.AnsiStringFixedLength, model.SendNum);
            this._db.AddInParameter(cmd, "SendText", System.Data.DbType.String, model.SendText);
            this._db.AddInParameter(cmd, "issuetime", System.Data.DbType.DateTime, model.IssueTime);
            this._db.AddInParameter(cmd, "ProductID", System.Data.DbType.AnsiStringFixedLength, model.ProductID);
            this._db.AddInParameter(cmd, "minusNum", System.Data.DbType.Int32, model.minusNum);
            this._db.AddInParameter(cmd, "FavourCode", System.Data.DbType.String, model.FavourCode);

            return DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false;
        }
示例#19
0
        /// <summary>
        /// 添加发送信息
        /// </summary>
        /// <param name="model">发送信息实体</param>
        /// <returns></returns>
        public bool Add(Eyousoft_yhq.Model.MJiPiaoBaoCun model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("INSERT INTO tbl_PlanTicket (OrderID ,OrderCode ,OpeatorID ,OpeatorName ,IssueTime,ModifyTag,JpAdress,OrderPrice,InsPrice,WeiDianId) VALUES (@OrderID ,@OrderCode ,@OpeatorID ,@OpeatorName ,@IssueTime,@ModifyTag,@JpAdress,@OrderPrice,@InsPrice,@WeiDianId)");
            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());
            this._db.AddInParameter(cmd, "OrderID", System.Data.DbType.String, model.OrderID);
            this._db.AddInParameter(cmd, "OrderCode", System.Data.DbType.String, model.OrderCode);
            this._db.AddInParameter(cmd, "OpeatorID", System.Data.DbType.String, model.OpeatorID);
            this._db.AddInParameter(cmd, "OpeatorName", System.Data.DbType.String, model.OpeatorName);
            this._db.AddInParameter(cmd, "IssueTime", System.Data.DbType.DateTime, model.IssueTime);
            this._db.AddInParameter(cmd, "ModifyTag", System.Data.DbType.String, model.ModifyTag);
            this._db.AddInParameter(cmd, "JpAdress", System.Data.DbType.String, model.JpAdress);
            this._db.AddInParameter(cmd, "OrderPrice", System.Data.DbType.Decimal, model.OrderPrice);
            this._db.AddInParameter(cmd, "InsPrice", System.Data.DbType.Decimal, model.InsPrice);
            _db.AddInParameter(cmd, "WeiDianId", System.Data.DbType.AnsiStringFixedLength, model.WeiDianId);

            return DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false;
        }
示例#20
0
        protected bool AddOrder(string Pid, object OrderstateDown, decimal Price, out  Eyousoft_yhq.Model.Order order)
        {
            Eyousoft_yhq.BLL.Order OrderBll = new Eyousoft_yhq.BLL.Order();
            var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();

            int peopole = Utils.GetInt(Utils.GetQueryStringValue("renshu"), 1);

            if (MemberModel != null)
            {
                Eyousoft_yhq.Model.Order OrderModel = new Eyousoft_yhq.Model.Order()
                {
                    OrderID = Guid.NewGuid().ToString(),
                    ProductID = Pid,
                    MemberID = MemberModel.UserID,
                    MemberTel = MemberModel.UserName,
                    MemberName = MemberModel.ContactName,
                    MemberSex = MemberModel.ContactSex,
                    OrderState = (Eyousoft_yhq.Model.OrderState)OrderstateDown,
                    PayState = Eyousoft_yhq.Model.PaymentState.未支付,
                    IsCheck = true,
                    ConfirmCode = "",
                    Remark = "",
                    OrderPrice = Price * peopole,
                    PeopleNum = peopole
                };
                OrderModel.WeiDianId = Utils.GetQueryStringValue("weidianid");
                int num = OrderBll.Add(OrderModel);
                if (num > 0)
                {
                    order = OrderModel;
                    return true;
                }
                else
                {
                    order = OrderModel;
                    return false;
                }
            }
            else
            {
                order = new Eyousoft_yhq.Model.Order();
                return false;
            }
        }
示例#21
0
文件: GYSticket.cs 项目: uwitec/O2O
        /// <summary>
        /// 车票/景点门票添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Add(Eyousoft_yhq.Model.GYSticket model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("  INSERT INTO GYSTicket  (ID,CusName,CusSex,CusMob,PlaneTicket,IssueTime,Remark,OpertorID,OrderState,TicketState) VALUES (@ID,@CusName,@CusSex,@CusMob,@PlaneTicket,@IssueTime,@Remark,@OpertorID,@OrderState,@TicketState) ");

            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());

            this._db.AddInParameter(cmd, "ID", DbType.AnsiStringFixedLength, model.ID);
            this._db.AddInParameter(cmd, "CusName", DbType.String, model.CusName);
            this._db.AddInParameter(cmd, "CusSex", DbType.Int32, (int)model.CusSex);
            this._db.AddInParameter(cmd, "CusMob", DbType.String, model.CusMob);
            this._db.AddInParameter(cmd, "PlaneTicket", DbType.String, model.PlaneTicket);
            this._db.AddInParameter(cmd, "IssueTime", DbType.DateTime, model.IssueTime);
            this._db.AddInParameter(cmd, "Remark", DbType.String, model.Remark);
            this._db.AddInParameter(cmd, "OpertorID", DbType.AnsiStringFixedLength, model.OpertorID);
            this._db.AddInParameter(cmd, "OrderState", DbType.Byte, (int)model.orderState);
            this._db.AddInParameter(cmd, "TicketState", DbType.Byte, (int)model.payState);

            return DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false;
        }
示例#22
0
文件: DCustomMsg.cs 项目: uwitec/O2O
        /// <summary>
        ///  增加一条数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int Add(Eyousoft_yhq.Model.WXBind model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("INSERT INTO tbl_WeiXinBind( CustomerId , CustomerName , MobilePhone , OpenId , NickName , Sex  , SubscribeTime , Country , Province , City , Language ) VALUES ( @CustomerId , @CustomerName , @MobilePhone , @OpenId , @NickName , @Sex  , @SubscribeTime , @Country , @Province , @City , @LANGUAGE )");

            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());
            this._db.AddInParameter(cmd, "CustomerId", System.Data.DbType.String, model.CustomerId);
            this._db.AddInParameter(cmd, "CustomerName", System.Data.DbType.String, model.CustomerName);
            this._db.AddInParameter(cmd, "MobilePhone", System.Data.DbType.String, model.MobilePhone);
            this._db.AddInParameter(cmd, "OpenId", System.Data.DbType.String, model.OpenId);
            this._db.AddInParameter(cmd, "NickName", System.Data.DbType.String, model.NickName);
            this._db.AddInParameter(cmd, "Sex", System.Data.DbType.String, model.Sex);
            this._db.AddInParameter(cmd, "SubscribeTime", System.Data.DbType.String, model.SubscribeTime);
            this._db.AddInParameter(cmd, "Province", System.Data.DbType.String, model.Province);
            this._db.AddInParameter(cmd, "City", System.Data.DbType.String, model.City);
            this._db.AddInParameter(cmd, "Language", System.Data.DbType.String, model.Language);

            return DbHelper.ExecuteSql(cmd, this._db);
        }
示例#23
0
文件: Product.cs 项目: uwitec/O2O
        /// <summary>
        /// 产品添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Add(Eyousoft_yhq.Model.Product model)
        {
            DbCommand cmd = this._db.GetStoredProcCommand("Proc_Product_Add");

            _db.AddInParameter(cmd, "ProductID", DbType.String, model.ProductID);
            _db.AddInParameter(cmd, "ProductName", DbType.String, model.ProductName);
            _db.AddInParameter(cmd, "ProductType", DbType.Int32, model.ProductType);
            _db.AddInParameter(cmd, "TourDate", DbType.DateTime, model.TourDate);
            _db.AddInParameter(cmd, "MarketPrice", DbType.Decimal, model.MarketPrice);
            _db.AddInParameter(cmd, "AppPrice", DbType.Decimal, model.AppPrice);
            _db.AddInParameter(cmd, "FavourCode", DbType.String, model.FavourCode);
            _db.AddInParameter(cmd, "LinkTel", DbType.String, model.LinkTel);
            _db.AddInParameter(cmd, "ProductDis", DbType.String, model.ProductDis);
            _db.AddInParameter(cmd, "TourDis", DbType.String, model.TourDis);
            _db.AddInParameter(cmd, "SendTourKnow", DbType.String, model.SendTourKnow);
            _db.AddInParameter(cmd, "ValidiDate", DbType.String, model.ValidiDate);
            _db.AddInParameter(cmd, "ProductState", DbType.Byte, model.ProductState);
            _db.AddInParameter(cmd, "ComAttachXML", DbType.Xml, CreateComNoticeXML(model.AttachList));
            _db.AddInParameter(cmd, "IsEveryDay", DbType.Byte, model.IsEveryDay);
            _db.AddInParameter(cmd, "IsHot", DbType.Int32, model.IsHot);
            _db.AddInParameter(cmd, "ServiceQQ", DbType.String, model.ServiceQQ);
            _db.AddInParameter(cmd, "ContractType", DbType.Byte, (int)model.ContractType);
            _db.AddInParameter(cmd, "ControlPeople", DbType.Int32, model.ControlPeople);
            _db.AddInParameter(cmd, "Scompare", DbType.String, model.Scompare);

            #region 车票 门票修改
            _db.AddInParameter(cmd, "ProductOpState", DbType.Byte, model.ProductOpState);
            _db.AddInParameter(cmd, "ProductSdate", DbType.DateTime, model.ProductSdate);
            _db.AddInParameter(cmd, "ZCodeViaDate", DbType.DateTime, model.ZCodeViaDate);
            _db.AddInParameter(cmd, "PType", DbType.Int32, model.PType);
            #endregion

            this._db.AddOutParameter(cmd, "result", DbType.Int32, 4);

            _db.AddInParameter(cmd, "FaBuRenId", DbType.AnsiStringFixedLength, model.FaBuRenId);
            _db.AddInParameter(cmd, "ShenHeStatus", DbType.Int32, model.ShenHeStatus);

            DbHelper.RunProcedureWithResult(cmd, this._db);

            return Convert.ToInt32(this._db.GetParameterValue(cmd, "Result")) > 0 ? true : false;
        }
示例#24
0
文件: DConDetaile.cs 项目: uwitec/O2O
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="RecordCount"></param>
        /// <param name="serModel"></param>
        /// <returns></returns>
        public IList<Eyousoft_yhq.Model.MConDetaile> GetModelList(int PageSize, int PageIndex, ref int RecordCount, Eyousoft_yhq.Model.MConDetaile serModel)
        {
            IList<Eyousoft_yhq.Model.MConDetaile> list = new List<Eyousoft_yhq.Model.MConDetaile>();

            string tableName = "tbl_ConDetailed";
            string fileds = " ID,HuiYuanID,(select UserName from tbl_Member where UserId=tbl_ConDetailed.HuiYuanID ) as HuiYuanName, JiaoYiHao ,JinE ,JiaoYiShiJian, XiaoFeiFangShi ,DingDanBianHao ,JiaoYiDuiXiang,(select UserName from tbl_Member where UserId=tbl_ConDetailed.JiaoYiDuiXiang ) as DXName, DingDanLeiBie ";
            string orderByString = "JiaoYiShiJian desc ";

            StringBuilder query = new StringBuilder();
            query.AppendFormat(" 1=1 ");

            if (serModel != null)
            {

            }

            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {
                while (dr.Read())
                {
                    Eyousoft_yhq.Model.MConDetaile model = new Eyousoft_yhq.Model.MConDetaile();
                    model.ID = dr.GetInt32(dr.GetOrdinal("ID"));
                    model.HuiYuanID = dr.GetString(dr.GetOrdinal("HuiYuanID"));
                    model.HuiYuanName = dr.GetString(dr.GetOrdinal("HuiYuanName"));

                    model.JiaoYiHao = dr.GetString(dr.GetOrdinal("JiaoYiHao"));
                    model.JinE = dr.GetDecimal(dr.GetOrdinal("JinE"));
                    model.JiaoYiShiJian = dr.GetDateTime(dr.GetOrdinal("JiaoYiShiJian"));
                    model.XFway = (Eyousoft_yhq.Model.XFfangshi)dr.GetByte(dr.GetOrdinal("XiaoFeiFangShi"));

                    model.DingDanBianHao = dr.GetString(dr.GetOrdinal("DingDanBianHao"));
                    model.DuiXiangName = dr.IsDBNull(dr.GetOrdinal("DXName")) ? "" : dr.GetString(dr.GetOrdinal("DXName"));
                    model.DDCarrtes = (Eyousoft_yhq.Model.DDleibie)dr.GetByte(dr.GetOrdinal("DingDanLeiBie"));

                    list.Add(model);
                }
            }
            return list;
        }
示例#25
0
文件: DYuYue.cs 项目: uwitec/O2O
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="RecordCount"></param>
        /// <param name="serModel"></param>
        /// <returns></returns>
        public IList<Eyousoft_yhq.Model.MYuYue> GetList(int PageSize, int PageIndex, ref int RecordCount, Eyousoft_yhq.Model.MYuYueSer serModel)
        {
            IList<Eyousoft_yhq.Model.MYuYue> list = new List<Eyousoft_yhq.Model.MYuYue>();

            string tableName = "tbl_YuYue";

            string fileds = " * ";

            string orderByString = " YYTime desc ";

            StringBuilder query = new StringBuilder();
            query.Append(" 1=1 ");

            if (serModel != null)
            {

            }

            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {

                while (dr.Read())
                {
                    Eyousoft_yhq.Model.MYuYue model = new Eyousoft_yhq.Model.MYuYue();

                    model.YYID = dr.GetInt32(dr.GetOrdinal("YYID"));

                    model.YYRoute = dr.IsDBNull(dr.GetOrdinal("YYRoute")) ? "" : dr.GetString(dr.GetOrdinal("YYRoute"));
                    model.YYName = dr.IsDBNull(dr.GetOrdinal("YYName")) ? "" : dr.GetString(dr.GetOrdinal("YYName"));
                    model.YYMobile = dr.IsDBNull(dr.GetOrdinal("YYMobile")) ? "" : dr.GetString(dr.GetOrdinal("YYMobile"));
                    model.YYInfo = dr.IsDBNull(dr.GetOrdinal("YYInfo")) ? "" : dr.GetString(dr.GetOrdinal("YYInfo"));

                    model.YYTime = dr.GetDateTime(dr.GetOrdinal("YYTime"));
                    list.Add(model);
                }
            };
            return list;
        }
示例#26
0
        /// <summary>
        /// 获取一个订单
        /// </summary>
        /// <param name="serModel">订单编号</param>
        /// <returns></returns>
        public IList<Eyousoft_yhq.Model.MJiPiaoBaoCun> GetList(Eyousoft_yhq.Model.MJiPiaoBaoCunSer serModel)
        {
            IList<Eyousoft_yhq.Model.MJiPiaoBaoCun> list = new List<MJiPiaoBaoCun>();
            StringBuilder StrSql = new StringBuilder();
            StrSql.Append("select  *  from tbl_PlanTicket where  1=1 ");
            if (serModel != null)
            {
                if (!string.IsNullOrEmpty(serModel.OpeatorID))
                {
                    StrSql.AppendFormat(" and  OpeatorID = '{0}' ", serModel.OpeatorID);
                }
                if (serModel.payState.HasValue && serModel.payState == TickOrderPayState.未支付)
                {
                    StrSql.AppendFormat(" and  payState = '{0}' ", (int)serModel.payState.Value);
                }
            }
            StrSql.Append("  order by IssueTime  DESC  ");
            DbCommand dc = this._db.GetSqlStringCommand(StrSql.ToString());
            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                while (dr.Read())
                {
                    Eyousoft_yhq.Model.MJiPiaoBaoCun model = new Eyousoft_yhq.Model.MJiPiaoBaoCun();

                    model.OrderID = dr.GetString(dr.GetOrdinal("OrderID"));
                    model.OrderCode = dr.GetString(dr.GetOrdinal("OrderCode"));
                    model.OpeatorID = dr.GetString(dr.GetOrdinal("OpeatorID"));
                    model.OpeatorName = dr.GetString(dr.GetOrdinal("OpeatorName"));
                    model.IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.JpAdress = dr.IsDBNull(dr.GetOrdinal("JpAdress")) ? "" : dr.GetString(dr.GetOrdinal("JpAdress"));
                    model.ModifyTag = dr.IsDBNull(dr.GetOrdinal("ModifyTag")) ? "" : dr.GetString(dr.GetOrdinal("ModifyTag"));
                    model.payState = (TickOrderPayState)dr.GetByte(dr.GetOrdinal("payState"));
                    model.InsPrice = dr.GetDecimal(dr.GetOrdinal("InsPrice"));
                    list.Add(model);
                }
            }
            return list;
        }
示例#27
0
文件: DCustomMsg.cs 项目: uwitec/O2O
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="RecordCount"></param>
        /// <param name="serModel"></param>
        /// <returns></returns>
        public IList<Eyousoft_yhq.Model.CustomMsg> GetList(int PageSize, int PageIndex, ref int RecordCount, Eyousoft_yhq.Model.serCustomMsg serModel)
        {
            IList<Eyousoft_yhq.Model.CustomMsg> list = new List<Eyousoft_yhq.Model.CustomMsg>();

            string tableName = "tbl_Recommend";

            string fileds = " * ";

            string orderByString = " IssueTime desc ";

            StringBuilder query = new StringBuilder();
            query.Append(" 1=1 ");

            if (serModel != null)
            {

            }

            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {

                while (dr.Read())
                {
                    Eyousoft_yhq.Model.CustomMsg model = new Eyousoft_yhq.Model.CustomMsg();

                    model.Id = dr.GetInt32(dr.GetOrdinal("id"));
                    model.OpenId = dr.GetString(dr.GetOrdinal("OpenId"));
                    model.NickName = dr.GetString(dr.GetOrdinal("NickName"));
                    model.Sex = dr.GetString(dr.GetOrdinal("Sex"));
                    model.IssueTime = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.CommendInfo = dr.GetString(dr.GetOrdinal("CommendInfo"));
                    list.Add(model);
                }
            };
            return list;
        }
示例#28
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool UpdateSysProvince(Eyousoft_yhq.Model.MSysProvince model)
 {
     string StrSql = "UPDATE tbl_SysProvince SET CountryId=@CountryId,HeaderLetter=@HeaderLetter,Name=@Name,AreaId=@AreaId,SortId=@SortId WHERE ID=@ID";
     DbCommand dc = this._db.GetSqlStringCommand(StrSql);
     this._db.AddInParameter(dc, "CountryId", DbType.Int32, model.CountryId);
     this._db.AddInParameter(dc, "HeaderLetter", DbType.String, model.HeaderLetter);
     this._db.AddInParameter(dc, "Name", DbType.String, model.Name);
     this._db.AddInParameter(dc, "AreaId", DbType.Int32, model.AreaId);
     this._db.AddInParameter(dc, "SortId", DbType.Int32, model.SortId);
     this._db.AddInParameter(dc, "ID", DbType.Int32, model.ID);
     return DbHelper.ExecuteSql(dc, this._db) > 0 ? true : false;
 }
示例#29
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool UpdateSysDistrict(Eyousoft_yhq.Model.MSysDistrict model)
 {
     string StrSql = "UPDATE tbl_SysDistrict SET Name = @Name,ProvinceId = @ProvinceId,CityId = @CityId,HeaderLetter=@HeaderLetter WHERE Id=@Id";
     DbCommand dc = this._db.GetSqlStringCommand(StrSql);
     this._db.AddInParameter(dc, "Name", DbType.String, model.Name);
     this._db.AddInParameter(dc, "ProvinceId", DbType.Int32, model.ProvinceId);
     this._db.AddInParameter(dc, "CityId", DbType.Int32, model.CityId);
     this._db.AddInParameter(dc, "HeaderLetter", DbType.String, model.HeaderLetter);
     this._db.AddInParameter(dc, "Id", DbType.Int32, model.Id);
     return DbHelper.ExecuteSql(dc, this._db) > 0 ? true : false;
 }
示例#30
0
文件: AreaInfo.cs 项目: uwitec/O2O
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool UpdateSysCountry(Eyousoft_yhq.Model.MSysCountry model)
 {
     string StrSql = "UPDATE tbl_SysCountry SET EnName = @EnName,Zones = @Zones,CnName = @CnName WHERE Id=@Id";
     DbCommand dc = this._db.GetSqlStringCommand(StrSql);
     this._db.AddInParameter(dc, "EnName", DbType.String, model.EnName);
     this._db.AddInParameter(dc, "CnName", DbType.String, model.CnName);
     this._db.AddInParameter(dc, "Zones", DbType.Int32, model.Zones);
     this._db.AddInParameter(dc, "Id", DbType.Int32, model.Id);
     return DbHelper.ExecuteSql(dc, this._db) > 0 ? true : false;
 }