Esempio n. 1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.SiteModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Site(");
            strSql.Append("ID,TimeNow,Peoples)");
            strSql.Append(" values (");
            strSql.Append("@ID,@TimeNow,@Peoples)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4),
                    new SqlParameter("@TimeNow", SqlDbType.VarChar,50),
                    new SqlParameter("@Peoples", SqlDbType.VarChar,50)};
            parameters[0].Value = model.ID;
            parameters[1].Value = model.TimeNow;
            parameters[2].Value = model.Peoples;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.ExtensionCardInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into ExtensionCardInfo(");
            strSql.Append("MemberId,ExtensionStartTm,ExtensionEndTm,CreateTime)");
            strSql.Append(" values (");
            strSql.Append("@MemberId,@ExtensionStartTm,@ExtensionEndTm,@CreateTime)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@MemberId", SqlDbType.Int,4),
                    new SqlParameter("@ExtensionStartTm", SqlDbType.DateTime),
                    new SqlParameter("@ExtensionEndTm", SqlDbType.DateTime),
                    new SqlParameter("@CreateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.MemberId;
            parameters[1].Value = model.ExtensionStartTm;
            parameters[2].Value = model.ExtensionEndTm;
            parameters[3].Value = model.CreateTime;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.LossCardModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into LossCard(");
            strSql.Append("MemberId,OldCardNumber,PatchCardNo,PatchTime,CreateTime)");
            strSql.Append(" values (");
            strSql.Append("@MemberId,@OldCardNumber,@PatchCardNo,@PatchTime,@CreateTime)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@MemberId", SqlDbType.Int,4),
                    new SqlParameter("@OldCardNumber", SqlDbType.VarChar,50),
                    new SqlParameter("@PatchCardNo", SqlDbType.VarChar,50),
                    new SqlParameter("@PatchTime", SqlDbType.DateTime),
                    new SqlParameter("@CreateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.MemberId;
            parameters[1].Value = model.OldCardNumber;
            parameters[2].Value = model.PatchCardNo;
            parameters[3].Value = model.PatchTime;
            parameters[4].Value = model.CreateTime;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.Sys_FunctionSmallModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Sys_FunctionSmall(");
            strSql.Append("FunctionSmallId,FunctionBigId,FunctionSmallName,FunctionLinkToolTip,FunctionUrl,SortId,IsBlank,IsShow)");
            strSql.Append(" values (");
            strSql.Append("@FunctionSmallId,@FunctionBigId,@FunctionSmallName,@FunctionLinkToolTip,@FunctionUrl,@SortId,@IsBlank,@IsShow)");
            SqlParameter[] parameters = {
                    new SqlParameter("@FunctionSmallId", SqlDbType.Int,4),
                    new SqlParameter("@FunctionBigId", SqlDbType.Int,4),
                    new SqlParameter("@FunctionSmallName", SqlDbType.VarChar,200),
                    new SqlParameter("@FunctionLinkToolTip", SqlDbType.VarChar,100),
                    new SqlParameter("@FunctionUrl", SqlDbType.VarChar,300),
                    new SqlParameter("@SortId", SqlDbType.Int,4),
                    new SqlParameter("@IsBlank", SqlDbType.Int,4),
                    new SqlParameter("@IsShow", SqlDbType.Int,4)};
            parameters[0].Value = model.FunctionSmallId;
            parameters[1].Value = model.FunctionBigId;
            parameters[2].Value = model.FunctionSmallName;
            parameters[3].Value = model.FunctionLinkToolTip;
            parameters[4].Value = model.FunctionUrl;
            parameters[5].Value = model.SortId;
            parameters[6].Value = model.IsBlank;
            parameters[7].Value = model.IsShow;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.CardTypeInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into CardTypeInfo(");
            strSql.Append("CardTypeName,MonthsPrice,Months,DayPrice,DateTime,TypeName,CardCount)");
            strSql.Append(" values (");
            strSql.Append("@CardTypeName,@MonthsPrice,@Months,@DayPrice,@DateTime,@TypeName,@CardCount)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@CardTypeName", SqlDbType.VarChar,150),
                    new SqlParameter("@MonthsPrice", SqlDbType.VarChar,150),
                    new SqlParameter("@Months", SqlDbType.VarChar,150),
                    new SqlParameter("@DayPrice", SqlDbType.VarChar,150),
                    new SqlParameter("@DateTime", SqlDbType.VarChar,150),
                    new SqlParameter("@TypeName", SqlDbType.VarChar,50),
                    new SqlParameter("@CardCount", SqlDbType.VarChar,50)};
            parameters[0].Value = model.CardTypeName;
            parameters[1].Value = model.MonthsPrice;
            parameters[2].Value = model.Months;
            parameters[3].Value = model.DayPrice;
            parameters[4].Value = model.DateTime;
            parameters[5].Value = model.TypeName;
            parameters[6].Value = model.CardCount;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.RoleModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Role(");
            strSql.Append("RoleId,RoleName,RoleMailRoom,RoleSynopsis,DataTime)");
            strSql.Append(" values (");
            strSql.Append("@RoleId,@RoleName,@RoleMailRoom,@RoleSynopsis,@DataTime)");
            SqlParameter[] parameters = {
                    new SqlParameter("@RoleId", SqlDbType.Int,4),
                    new SqlParameter("@RoleName", SqlDbType.VarChar,100),
                    new SqlParameter("@RoleMailRoom", SqlDbType.Int,4),
                    new SqlParameter("@RoleSynopsis", SqlDbType.Text),
                    new SqlParameter("@DataTime", SqlDbType.VarChar,100)};
            parameters[0].Value = model.RoleId;
            parameters[1].Value = model.RoleName;
            parameters[2].Value = model.RoleMailRoom;
            parameters[3].Value = model.RoleSynopsis;
            parameters[4].Value = model.DataTime;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.SystemLoginLogModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into SystemLoginLog(");
            strSql.Append("LoginLogId,UserId,LoginIP,LoginAddress,LoginDate,LoginType,LoginCont)");
            strSql.Append(" values (");
            strSql.Append("@LoginLogId,@UserId,@LoginIP,@LoginAddress,@LoginDate,@LoginType,@LoginCont)");
            SqlParameter[] parameters = {
                    new SqlParameter("@LoginLogId", SqlDbType.Int,4),
                    new SqlParameter("@UserId", SqlDbType.Int,4),
                    new SqlParameter("@LoginIP", SqlDbType.VarChar,200),
                    new SqlParameter("@LoginAddress", SqlDbType.VarChar,200),
                    new SqlParameter("@LoginDate", SqlDbType.VarChar,100),
                    new SqlParameter("@LoginType", SqlDbType.VarChar,100),
                    new SqlParameter("@LoginCont", SqlDbType.VarChar,100)};
            parameters[0].Value = model.LoginLogId;
            parameters[1].Value = model.UserId;
            parameters[2].Value = model.LoginIP;
            parameters[3].Value = model.LoginAddress;
            parameters[4].Value = model.LoginDate;
            parameters[5].Value = model.LoginType;
            parameters[6].Value = model.LoginCont;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.PositionInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into PositionInfo(");
            strSql.Append("ID,Name,Price,Des,TypeName,PState)");
            strSql.Append(" values (");
            strSql.Append("@ID,@Name,@Price,@Des,@TypeName,@PState)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@Price", SqlDbType.VarChar,50),
                    new SqlParameter("@Des", SqlDbType.VarChar,100),
                    new SqlParameter("@TypeName", SqlDbType.VarChar,50),
                    new SqlParameter("@PState", SqlDbType.VarChar,50)};
            parameters[0].Value = model.ID;
            parameters[1].Value = model.Name;
            parameters[2].Value = model.Price;
            parameters[3].Value = model.Des;
            parameters[4].Value = model.TypeName;
            parameters[5].Value = model.PState;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 9
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.Sys_FunctionBigModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Sys_FunctionBig(");
            strSql.Append("FunctionBigId,FunctionBigName,FunctionChildCount,FunctionSortId)");
            strSql.Append(" values (");
            strSql.Append("@FunctionBigId,@FunctionBigName,@FunctionChildCount,@FunctionSortId)");
            SqlParameter[] parameters = {
                    new SqlParameter("@FunctionBigId", SqlDbType.Int,4),
                    new SqlParameter("@FunctionBigName", SqlDbType.VarChar,200),
                    new SqlParameter("@FunctionChildCount", SqlDbType.Int,4),
                    new SqlParameter("@FunctionSortId", SqlDbType.Int,4)};
            parameters[0].Value = model.FunctionBigId;
            parameters[1].Value = model.FunctionBigName;
            parameters[2].Value = model.FunctionChildCount;
            parameters[3].Value = model.FunctionSortId;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.CunsumeTypeModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into CunsumeType(");
            strSql.Append("CusType,CusPrice,CreateTime)");
            strSql.Append(" values (");
            strSql.Append("@CusType,@CusPrice,@CreateTime)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@CusType", SqlDbType.VarChar,50),
                    new SqlParameter("@CusPrice", SqlDbType.Decimal,9),
                    new SqlParameter("@CreateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.CusType;
            parameters[1].Value = model.CusPrice;
            parameters[2].Value = model.CreateTime;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.LossCastModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into LossCast(");
            strSql.Append("LossCardId,PayableAmount,PaymentAmount,ChangeAmount,CreateTime)");
            strSql.Append(" values (");
            strSql.Append("@LossCardId,@PayableAmount,@PaymentAmount,@ChangeAmount,@CreateTime)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@LossCardId", SqlDbType.Int,4),
                    new SqlParameter("@PayableAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@PaymentAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@ChangeAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@CreateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.LossCardId;
            parameters[1].Value = model.PayableAmount;
            parameters[2].Value = model.PaymentAmount;
            parameters[3].Value = model.ChangeAmount;
            parameters[4].Value = model.CreateTime;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 12
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.BackCardInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into BackCardInfo(");
            strSql.Append("Id,CardNumber,CardType,Name,IDCardType,IDCardNumber,AddTime,StartTime,EndTime,TotalDays,LeftDays,TotalTimes,LeftTimes,PaidAmount,ChangeAmount,PatchAmount,UsedAmount,CreateTime)");
            strSql.Append(" values (");
            strSql.Append("@Id,@CardNumber,@CardType,@Name,@IDCardType,@IDCardNumber,@AddTime,@StartTime,@EndTime,@TotalDays,@LeftDays,@TotalTimes,@LeftTimes,@PaidAmount,@ChangeAmount,@PatchAmount,@UsedAmount,@CreateTime)");
            SqlParameter[] parameters = {
                    new SqlParameter("@Id", SqlDbType.Int,4),
                    new SqlParameter("@CardNumber", SqlDbType.VarChar,50),
                    new SqlParameter("@CardType", SqlDbType.VarChar,50),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCardType", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCardNumber", SqlDbType.VarChar,50),
                    new SqlParameter("@AddTime", SqlDbType.DateTime),
                    new SqlParameter("@StartTime", SqlDbType.DateTime),
                    new SqlParameter("@EndTime", SqlDbType.DateTime),
                    new SqlParameter("@TotalDays", SqlDbType.Int,4),
                    new SqlParameter("@LeftDays", SqlDbType.Int,4),
                    new SqlParameter("@TotalTimes", SqlDbType.Int,4),
                    new SqlParameter("@LeftTimes", SqlDbType.Int,4),
                    new SqlParameter("@PaidAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@ChangeAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@PatchAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@UsedAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@CreateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.Id;
            parameters[1].Value = model.CardNumber;
            parameters[2].Value = model.CardType;
            parameters[3].Value = model.Name;
            parameters[4].Value = model.IDCardType;
            parameters[5].Value = model.IDCardNumber;
            parameters[6].Value = model.AddTime;
            parameters[7].Value = model.StartTime;
            parameters[8].Value = model.EndTime;
            parameters[9].Value = model.TotalDays;
            parameters[10].Value = model.LeftDays;
            parameters[11].Value = model.TotalTimes;
            parameters[12].Value = model.LeftTimes;
            parameters[13].Value = model.PaidAmount;
            parameters[14].Value = model.ChangeAmount;
            parameters[15].Value = model.PatchAmount;
            parameters[16].Value = model.UsedAmount;
            parameters[17].Value = model.CreateTime;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 13
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.MemberHistoryInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into MemberHistoryInfo(");
            strSql.Append("CardID,Mail,CardType,IDCardType,Name,IDCard,Sex,StartTime,Birthday,EndTime,Phone,Count,Unit,AddTime,AddUserName,InfoType,Photo)");
            strSql.Append(" values (");
            strSql.Append("@CardID,@Mail,@CardType,@IDCardType,@Name,@IDCard,@Sex,@StartTime,@Birthday,@EndTime,@Phone,@Count,@Unit,@AddTime,@AddUserName,@InfoType,@Photo)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@CardID", SqlDbType.VarChar,50),
                    new SqlParameter("@Mail", SqlDbType.VarChar,50),
                    new SqlParameter("@CardType", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCardType", SqlDbType.VarChar,50),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCard", SqlDbType.VarChar,50),
                    new SqlParameter("@Sex", SqlDbType.VarChar,50),
                    new SqlParameter("@StartTime", SqlDbType.VarChar,50),
                    new SqlParameter("@Birthday", SqlDbType.VarChar,50),
                    new SqlParameter("@EndTime", SqlDbType.VarChar,50),
                    new SqlParameter("@Phone", SqlDbType.VarChar,50),
                    new SqlParameter("@Count", SqlDbType.VarChar,50),
                    new SqlParameter("@Unit", SqlDbType.VarChar,50),
                    new SqlParameter("@AddTime", SqlDbType.VarChar,50),
                    new SqlParameter("@AddUserName", SqlDbType.VarChar,50),
                    new SqlParameter("@InfoType", SqlDbType.VarChar,50),
                    new SqlParameter("@Photo", SqlDbType.Image)};
            parameters[0].Value = model.CardID;
            parameters[1].Value = model.Mail;
            parameters[2].Value = model.CardType;
            parameters[3].Value = model.IDCardType;
            parameters[4].Value = model.Name;
            parameters[5].Value = model.IDCard;
            parameters[6].Value = model.Sex;
            parameters[7].Value = model.StartTime;
            parameters[8].Value = model.Birthday;
            parameters[9].Value = model.EndTime;
            parameters[10].Value = model.Phone;
            parameters[11].Value = model.Count;
            parameters[12].Value = model.Unit;
            parameters[13].Value = model.AddTime;
            parameters[14].Value = model.AddUserName;
            parameters[15].Value = model.InfoType;
            parameters[16].Value = model.Photo;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 14
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.ReservationInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into ReservationInfo(");
            strSql.Append("ID,ReservationNum,TypeName,Position,Times,Money,Name,Peoples,Phone,PriceAmount,PaymentAmount,ChangeAmount,AddTime,AddUserName,Des,PayType,RState)");
            strSql.Append(" values (");
            strSql.Append("@ID,@ReservationNum,@TypeName,@Position,@Times,@Money,@Name,@Peoples,@Phone,@PriceAmount,@PaymentAmount,@ChangeAmount,@AddTime,@AddUserName,@Des,@PayType,@RState)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4),
                    new SqlParameter("@ReservationNum", SqlDbType.VarChar,50),
                    new SqlParameter("@TypeName", SqlDbType.VarChar,50),
                    new SqlParameter("@Position", SqlDbType.VarChar,50),
                    new SqlParameter("@Times", SqlDbType.VarChar,50),
                    new SqlParameter("@Money", SqlDbType.VarChar,50),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@Peoples", SqlDbType.VarChar,50),
                    new SqlParameter("@Phone", SqlDbType.VarChar,50),
                    new SqlParameter("@PriceAmount", SqlDbType.VarChar,50),
                    new SqlParameter("@PaymentAmount", SqlDbType.VarChar,50),
                    new SqlParameter("@ChangeAmount", SqlDbType.VarChar,50),
                    new SqlParameter("@AddTime", SqlDbType.VarChar,50),
                    new SqlParameter("@AddUserName", SqlDbType.VarChar,50),
                    new SqlParameter("@Des", SqlDbType.VarChar,500),
                    new SqlParameter("@PayType", SqlDbType.VarChar,50),
                    new SqlParameter("@RState", SqlDbType.NChar,10)};
            parameters[0].Value = model.ID;
            parameters[1].Value = model.ReservationNum;
            parameters[2].Value = model.TypeName;
            parameters[3].Value = model.Position;
            parameters[4].Value = model.Times;
            parameters[5].Value = model.Money;
            parameters[6].Value = model.Name;
            parameters[7].Value = model.Peoples;
            parameters[8].Value = model.Phone;
            parameters[9].Value = model.PriceAmount;
            parameters[10].Value = model.PaymentAmount;
            parameters[11].Value = model.ChangeAmount;
            parameters[12].Value = model.AddTime;
            parameters[13].Value = model.AddUserName;
            parameters[14].Value = model.Des;
            parameters[15].Value = model.PayType;
            parameters[16].Value = model.RState;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 15
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.SellCastModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into SellCast(");
            strSql.Append("MemberId,PriceAmount,PaymentAmount,ChangeAmount,CreateTime,AddUserName,AddTypeName,CardID,TypeName,Peoples,Des,Prices,CusType,CusNum,CusCount,CusState)");
            strSql.Append(" values (");
            strSql.Append("@MemberId,@PriceAmount,@PaymentAmount,@ChangeAmount,@CreateTime,@AddUserName,@AddTypeName,@CardID,@TypeName,@Peoples,@Des,@Prices,@CusType,@CusNum,@CusCount,@CusState)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@MemberId", SqlDbType.VarChar,50),
                    new SqlParameter("@PriceAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@PaymentAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@ChangeAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@CreateTime", SqlDbType.VarChar,50),
                    new SqlParameter("@AddUserName", SqlDbType.VarChar,50),
                    new SqlParameter("@AddTypeName", SqlDbType.VarChar,50),
                    new SqlParameter("@CardID", SqlDbType.VarChar,50),
                    new SqlParameter("@TypeName", SqlDbType.VarChar,50),
                    new SqlParameter("@Peoples", SqlDbType.VarChar,50),
                    new SqlParameter("@Des", SqlDbType.VarChar,500),
                    new SqlParameter("@Prices", SqlDbType.VarChar,50),
                    new SqlParameter("@CusType", SqlDbType.VarChar,50),
                    new SqlParameter("@CusNum", SqlDbType.VarChar,50),
                    new SqlParameter("@CusCount", SqlDbType.VarChar,50),
                    new SqlParameter("@CusState", SqlDbType.Int,4)};
            parameters[0].Value = model.MemberId;
            parameters[1].Value = model.PriceAmount;
            parameters[2].Value = model.PaymentAmount;
            parameters[3].Value = model.ChangeAmount;
            parameters[4].Value = model.CreateTime;
            parameters[5].Value = model.AddUserName;
            parameters[6].Value = model.AddTypeName;
            parameters[7].Value = model.CardID;
            parameters[8].Value = model.TypeName;
            parameters[9].Value = model.Peoples;
            parameters[10].Value = model.Des;
            parameters[11].Value = model.Prices;
            parameters[12].Value = model.CusType;
            parameters[13].Value = model.CusNum;
            parameters[14].Value = model.CusCount;
            parameters[15].Value = model.CusState;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 16
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.SwipingInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into SwipingInfo(");
            strSql.Append("ID,SwipingType,CardID,CardType,SwipingPeople,AddTime,AddUserName,Name,Des,CusNum,Peoples)");
            strSql.Append(" values (");
            strSql.Append("@ID,@SwipingType,@CardID,@CardType,@SwipingPeople,@AddTime,@AddUserName,@Name,@Des,@CusNum,@Peoples)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4),
                    new SqlParameter("@SwipingType", SqlDbType.VarChar,50),
                    new SqlParameter("@CardID", SqlDbType.VarChar,50),
                    new SqlParameter("@CardType", SqlDbType.VarChar,50),
                    new SqlParameter("@SwipingPeople", SqlDbType.VarChar,50),
                    new SqlParameter("@AddTime", SqlDbType.VarChar,50),
                    new SqlParameter("@AddUserName", SqlDbType.VarChar,50),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@Des", SqlDbType.VarChar,50),
                    new SqlParameter("@CusNum", SqlDbType.VarChar,50),
                    new SqlParameter("@Peoples", SqlDbType.VarChar,50)};
            parameters[0].Value = model.ID;
            parameters[1].Value = model.SwipingType;
            parameters[2].Value = model.CardID;
            parameters[3].Value = model.CardType;
            parameters[4].Value = model.SwipingPeople;
            parameters[5].Value = model.AddTime;
            parameters[6].Value = model.AddUserName;
            parameters[7].Value = model.Name;
            parameters[8].Value = model.Des;
            parameters[9].Value = model.CusNum;
            parameters[10].Value = model.Peoples;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 17
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Gymnasium_APP.Model.CunsumeCastModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into CunsumeCast(");
            strSql.Append("MemberId,CusType,TransactDate,PriceAmount,Count,PayableAmount,PaymentAmount,ChangeAmount,CreateTime)");
            strSql.Append(" values (");
            strSql.Append("@MemberId,@CusType,@TransactDate,@PriceAmount,@Count,@PayableAmount,@PaymentAmount,@ChangeAmount,@CreateTime)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@MemberId", SqlDbType.Int,4),
                    new SqlParameter("@CusType", SqlDbType.VarChar,50),
                    new SqlParameter("@TransactDate", SqlDbType.DateTime),
                    new SqlParameter("@PriceAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@Count", SqlDbType.Int,4),
                    new SqlParameter("@PayableAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@PaymentAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@ChangeAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@CreateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.MemberId;
            parameters[1].Value = model.CusType;
            parameters[2].Value = model.TransactDate;
            parameters[3].Value = model.PriceAmount;
            parameters[4].Value = model.Count;
            parameters[5].Value = model.PayableAmount;
            parameters[6].Value = model.PaymentAmount;
            parameters[7].Value = model.ChangeAmount;
            parameters[8].Value = model.CreateTime;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
Esempio n. 18
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.MenuModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into Menu(");
            strSql.Append("RoleMenuId,RoleId,RoleMenuBigFunctionId,RoleMenuFunctionId,IsAdd,IsDelete,IsModify,IsList,IsSpecial)");
            strSql.Append(" values (");
            strSql.Append("@RoleMenuId,@RoleId,@RoleMenuBigFunctionId,@RoleMenuFunctionId,@IsAdd,@IsDelete,@IsModify,@IsList,@IsSpecial)");
            SqlParameter[] parameters = {
                    new SqlParameter("@RoleMenuId", SqlDbType.Int,4),
                    new SqlParameter("@RoleId", SqlDbType.Int,4),
                    new SqlParameter("@RoleMenuBigFunctionId", SqlDbType.Int,4),
                    new SqlParameter("@RoleMenuFunctionId", SqlDbType.Int,4),
                    new SqlParameter("@IsAdd", SqlDbType.Int,4),
                    new SqlParameter("@IsDelete", SqlDbType.Int,4),
                    new SqlParameter("@IsModify", SqlDbType.Int,4),
                    new SqlParameter("@IsList", SqlDbType.Int,4),
                    new SqlParameter("@IsSpecial", SqlDbType.Int,4)};
            parameters[0].Value = model.RoleMenuId;
            parameters[1].Value = model.RoleId;
            parameters[2].Value = model.RoleMenuBigFunctionId;
            parameters[3].Value = model.RoleMenuFunctionId;
            parameters[4].Value = model.IsAdd;
            parameters[5].Value = model.IsDelete;
            parameters[6].Value = model.IsModify;
            parameters[7].Value = model.IsList;
            parameters[8].Value = model.IsSpecial;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Gymnasium_APP.Model.PositionReservationInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into PositionReservationInfo(");
            strSql.Append("ID,PositionName,DTime,Name,Phone,State,ReservationNum,TypeName,HTime)");
            strSql.Append(" values (");
            strSql.Append("@ID,@PositionName,@DTime,@Name,@Phone,@State,@ReservationNum,@TypeName,@HTime)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ID", SqlDbType.Int,4),
                    new SqlParameter("@PositionName", SqlDbType.VarChar,50),
                    new SqlParameter("@DTime", SqlDbType.VarChar,50),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@Phone", SqlDbType.VarChar,50),
                    new SqlParameter("@State", SqlDbType.VarChar,50),
                    new SqlParameter("@ReservationNum", SqlDbType.VarChar,50),
                    new SqlParameter("@TypeName", SqlDbType.VarChar,50),
                    new SqlParameter("@HTime", SqlDbType.VarChar,50)};
            parameters[0].Value = model.ID;
            parameters[1].Value = model.PositionName;
            parameters[2].Value = model.DTime;
            parameters[3].Value = model.Name;
            parameters[4].Value = model.Phone;
            parameters[5].Value = model.State;
            parameters[6].Value = model.ReservationNum;
            parameters[7].Value = model.TypeName;
            parameters[8].Value = model.HTime;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 20
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Gymnasium_APP.Model.MemberHistoryInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update MemberHistoryInfo set ");
            strSql.Append("CardID=@CardID,");
            strSql.Append("Mail=@Mail,");
            strSql.Append("CardType=@CardType,");
            strSql.Append("IDCardType=@IDCardType,");
            strSql.Append("Name=@Name,");
            strSql.Append("IDCard=@IDCard,");
            strSql.Append("Sex=@Sex,");
            strSql.Append("StartTime=@StartTime,");
            strSql.Append("Birthday=@Birthday,");
            strSql.Append("EndTime=@EndTime,");
            strSql.Append("Phone=@Phone,");
            strSql.Append("Count=@Count,");
            strSql.Append("Unit=@Unit,");
            strSql.Append("AddTime=@AddTime,");
            strSql.Append("AddUserName=@AddUserName,");
            strSql.Append("InfoType=@InfoType,");
            strSql.Append("Photo=@Photo");
            strSql.Append(" where MemberID=@MemberID");
            SqlParameter[] parameters = {
                    new SqlParameter("@CardID", SqlDbType.VarChar,50),
                    new SqlParameter("@Mail", SqlDbType.VarChar,50),
                    new SqlParameter("@CardType", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCardType", SqlDbType.VarChar,50),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCard", SqlDbType.VarChar,50),
                    new SqlParameter("@Sex", SqlDbType.VarChar,50),
                    new SqlParameter("@StartTime", SqlDbType.VarChar,50),
                    new SqlParameter("@Birthday", SqlDbType.VarChar,50),
                    new SqlParameter("@EndTime", SqlDbType.VarChar,50),
                    new SqlParameter("@Phone", SqlDbType.VarChar,50),
                    new SqlParameter("@Count", SqlDbType.VarChar,50),
                    new SqlParameter("@Unit", SqlDbType.VarChar,50),
                    new SqlParameter("@AddTime", SqlDbType.VarChar,50),
                    new SqlParameter("@AddUserName", SqlDbType.VarChar,50),
                    new SqlParameter("@InfoType", SqlDbType.VarChar,50),
                    new SqlParameter("@Photo", SqlDbType.Image),
                    new SqlParameter("@MemberID", SqlDbType.Int,4)};
            parameters[0].Value = model.CardID;
            parameters[1].Value = model.Mail;
            parameters[2].Value = model.CardType;
            parameters[3].Value = model.IDCardType;
            parameters[4].Value = model.Name;
            parameters[5].Value = model.IDCard;
            parameters[6].Value = model.Sex;
            parameters[7].Value = model.StartTime;
            parameters[8].Value = model.Birthday;
            parameters[9].Value = model.EndTime;
            parameters[10].Value = model.Phone;
            parameters[11].Value = model.Count;
            parameters[12].Value = model.Unit;
            parameters[13].Value = model.AddTime;
            parameters[14].Value = model.AddUserName;
            parameters[15].Value = model.InfoType;
            parameters[16].Value = model.Photo;
            parameters[17].Value = model.MemberID;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 21
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Gymnasium_APP.Model.CardTypeInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update CardTypeInfo set ");
            strSql.Append("CardTypeName=@CardTypeName,");
            strSql.Append("MonthsPrice=@MonthsPrice,");
            strSql.Append("Months=@Months,");
            strSql.Append("DayPrice=@DayPrice,");
            strSql.Append("DateTime=@DateTime,");
            strSql.Append("TypeName=@TypeName,");
            strSql.Append("CardCount=@CardCount");
            strSql.Append(" where CardTypeID=@CardTypeID");
            SqlParameter[] parameters = {
                    new SqlParameter("@CardTypeName", SqlDbType.VarChar,150),
                    new SqlParameter("@MonthsPrice", SqlDbType.VarChar,150),
                    new SqlParameter("@Months", SqlDbType.VarChar,150),
                    new SqlParameter("@DayPrice", SqlDbType.VarChar,150),
                    new SqlParameter("@DateTime", SqlDbType.VarChar,150),
                    new SqlParameter("@TypeName", SqlDbType.VarChar,50),
                    new SqlParameter("@CardCount", SqlDbType.VarChar,50),
                    new SqlParameter("@CardTypeID", SqlDbType.Int,4)};
            parameters[0].Value = model.CardTypeName;
            parameters[1].Value = model.MonthsPrice;
            parameters[2].Value = model.Months;
            parameters[3].Value = model.DayPrice;
            parameters[4].Value = model.DateTime;
            parameters[5].Value = model.TypeName;
            parameters[6].Value = model.CardCount;
            parameters[7].Value = model.CardTypeID;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 22
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Gymnasium_APP.Model.BackCardInfoModel model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("update BackCardInfo set ");
            strSql.Append("Id=@Id,");
            strSql.Append("CardNumber=@CardNumber,");
            strSql.Append("CardType=@CardType,");
            strSql.Append("Name=@Name,");
            strSql.Append("IDCardType=@IDCardType,");
            strSql.Append("IDCardNumber=@IDCardNumber,");
            strSql.Append("AddTime=@AddTime,");
            strSql.Append("StartTime=@StartTime,");
            strSql.Append("EndTime=@EndTime,");
            strSql.Append("TotalDays=@TotalDays,");
            strSql.Append("LeftDays=@LeftDays,");
            strSql.Append("TotalTimes=@TotalTimes,");
            strSql.Append("LeftTimes=@LeftTimes,");
            strSql.Append("PaidAmount=@PaidAmount,");
            strSql.Append("ChangeAmount=@ChangeAmount,");
            strSql.Append("PatchAmount=@PatchAmount,");
            strSql.Append("UsedAmount=@UsedAmount,");
            strSql.Append("CreateTime=@CreateTime");
            strSql.Append(" where ");
            SqlParameter[] parameters = {
                    new SqlParameter("@Id", SqlDbType.Int,4),
                    new SqlParameter("@CardNumber", SqlDbType.VarChar,50),
                    new SqlParameter("@CardType", SqlDbType.VarChar,50),
                    new SqlParameter("@Name", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCardType", SqlDbType.VarChar,50),
                    new SqlParameter("@IDCardNumber", SqlDbType.VarChar,50),
                    new SqlParameter("@AddTime", SqlDbType.DateTime),
                    new SqlParameter("@StartTime", SqlDbType.DateTime),
                    new SqlParameter("@EndTime", SqlDbType.DateTime),
                    new SqlParameter("@TotalDays", SqlDbType.Int,4),
                    new SqlParameter("@LeftDays", SqlDbType.Int,4),
                    new SqlParameter("@TotalTimes", SqlDbType.Int,4),
                    new SqlParameter("@LeftTimes", SqlDbType.Int,4),
                    new SqlParameter("@PaidAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@ChangeAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@PatchAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@UsedAmount", SqlDbType.Decimal,9),
                    new SqlParameter("@CreateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.Id;
            parameters[1].Value = model.CardNumber;
            parameters[2].Value = model.CardType;
            parameters[3].Value = model.Name;
            parameters[4].Value = model.IDCardType;
            parameters[5].Value = model.IDCardNumber;
            parameters[6].Value = model.AddTime;
            parameters[7].Value = model.StartTime;
            parameters[8].Value = model.EndTime;
            parameters[9].Value = model.TotalDays;
            parameters[10].Value = model.LeftDays;
            parameters[11].Value = model.TotalTimes;
            parameters[12].Value = model.LeftTimes;
            parameters[13].Value = model.PaidAmount;
            parameters[14].Value = model.ChangeAmount;
            parameters[15].Value = model.PatchAmount;
            parameters[16].Value = model.UsedAmount;
            parameters[17].Value = model.CreateTime;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
Esempio n. 23
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Gymnasium_APP.Model.Sys_FunctionBigModel model)
 {
     return dal.Add(model);
 }
Esempio n. 24
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Gymnasium_APP.Model.MemberInfoModel model)
 {
     return dal.Add(model);
 }
Esempio n. 25
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Gymnasium_APP.Model.Sys_FunctionBigModel model)
 {
     return dal.Update(model);
 }
Esempio n. 26
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Gymnasium_APP.Model.MemberInfoModel model)
 {
     return dal.Update(model);
 }
Esempio n. 27
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Gymnasium_APP.Model.LossCardModel model)
 {
     return dal.Add(model);
 }
Esempio n. 28
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Gymnasium_APP.Model.LossCardModel model)
 {
     return dal.Update(model);
 }
Esempio n. 29
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Gymnasium_APP.Model.RoleModel model)
 {
     return dal.Add(model);
 }
Esempio n. 30
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Gymnasium_APP.Model.RoleModel model)
 {
     return dal.Update(model);
 }