当前位置: 首页>>代码示例>>C#>>正文


C# CoalTraffic类代码示例

本文整理汇总了C#中CoalTraffic的典型用法代码示例。如果您正苦于以下问题:C# CoalTraffic类的具体用法?C# CoalTraffic怎么用?C# CoalTraffic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CoalTraffic类属于命名空间,在下文中一共展示了CoalTraffic类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public int Add(CoalTraffic.Model.TDYN_NoteHistory model)
        {
            //model.NoteCode=GetMaxId();
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TDYN_NoteHistory(");
            strSql.Append("NameplateCode,PhoneNumber,SMSText,HistoryTime,SendTime,SendState)");
            strSql.Append(" values (");
            strSql.Append("@NameplateCode,@PhoneNumber,@SMSText,@HistoryTime,@SendTime,@SendState)");
            SqlParameter[] parameters = {
                    new SqlParameter("@NameplateCode", SqlDbType.NVarChar),
                    new SqlParameter("@PhoneNumber", SqlDbType.NVarChar),
                    new SqlParameter("@SMSText", SqlDbType.NVarChar),
                    new SqlParameter("@HistoryTime", SqlDbType.DateTime),
                    new SqlParameter("@SendTime", SqlDbType.DateTime),
                    new SqlParameter("@SendState", SqlDbType.VarChar,1)};
            parameters[0].Value = model.NameplateCode;
            parameters[1].Value = model.PhoneNumber;
            parameters[2].Value = model.SMSText;
            parameters[3].Value = model.HistoryTime;
            parameters[4].Value = model.SendTime;
            parameters[5].Value = model.SendState;

            int iResult = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            return iResult;
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:28,代码来源:TDYN_NoteHistory.cs

示例2: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public void Add(CoalTraffic.Model.TT_LoadWeightByDay model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TT_LoadWeightByDay(");
            strSql.Append("RoomCode,CollCode,CoalKindCode,TaxGroup,WeightTime,NetWeight,TaxAmount)");
            strSql.Append(" values (");
            strSql.Append("@RoomCode,@CollCode,@CoalKindCode,@TaxGroup,@WeightTime,@NetWeight,@TaxAmount)");
            SqlParameter[] parameters = {
                    new SqlParameter("@RoomCode", SqlDbType.VarChar,10),
                    new SqlParameter("@CollCode", SqlDbType.VarChar,10),
                    new SqlParameter("@CoalKindCode", SqlDbType.VarChar,10),
                    new SqlParameter("@TaxGroup", SqlDbType.Decimal,9),
                    new SqlParameter("@WeightTime", SqlDbType.DateTime),
                    new SqlParameter("@NetWeight", SqlDbType.Decimal,9),
                    new SqlParameter("@TaxAmount", SqlDbType.Decimal,9)};
            parameters[0].Value = model.RoomCode;
            parameters[1].Value = model.CollCode;
            parameters[2].Value = model.CoalKindCode;
            parameters[3].Value = model.TaxGroup;
            parameters[4].Value = model.WeightTime;
            parameters[5].Value = model.NetWeight;
            parameters[6].Value = model.TaxAmount;

            DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
        }
开发者ID:SaintLoong,项目名称:YaoXian_CoalTraffic-CS-,代码行数:28,代码来源:TT_LoadWeightByDay.cs

示例3: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.TDY_ElecCoalYearSet model)
        {
            //model.YearCode=GetMaxId();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into TDY_ElecCoalYearSet(");
            strSql.Append("YearCode,YearName,CoalCode,Weight,IsForbid,Operator,OperateTime)");
            strSql.Append(" values (");
            strSql.Append("@YearCode,@YearName,@CoalCode,@Weight,@IsForbid,@Operator,@OperateTime)");
            SqlParameter[] parameters = {
                    new SqlParameter("@YearCode", SqlDbType.NVarChar),
                    new SqlParameter("@YearName", SqlDbType.NVarChar),
                    new SqlParameter("@CoalCode", SqlDbType.NVarChar),
                    new SqlParameter("@Weight", SqlDbType.Decimal,5),
                    new SqlParameter("@IsForbid", SqlDbType.VarChar,1),
                    new SqlParameter("@Operator", SqlDbType.NVarChar),
                    new SqlParameter("@OperateTime", SqlDbType.DateTime)};
            parameters[0].Value = model.YearCode;
            parameters[1].Value = model.YearName;
            parameters[2].Value = model.CoalCode;
            parameters[3].Value = model.Weight;
            parameters[4].Value = model.IsForbid;
            parameters[5].Value = model.Operator;
            parameters[6].Value = model.OperateTime;

            int i=DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            return i.ToString();
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:31,代码来源:TDY_ElecCoalYearSet.cs

示例4: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public bool Add(CoalTraffic.Model.TDY_Parcel model)
        {
            //model.ParcelCode=GetMaxId();
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TDY_Parcel(");
            strSql.Append("ParcelCode,CountryCode,ParcelName,Remark,IsForbid)");
            strSql.Append(" values (");
            strSql.Append("@ParcelCode,@CountryCode,@ParcelName,@Remark,@IsForbid)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ParcelCode", SqlDbType.VarChar,10),
                    new SqlParameter("@CountryCode", SqlDbType.VarChar,10),
                    new SqlParameter("@ParcelName", SqlDbType.NVarChar),
                    new SqlParameter("@Remark", SqlDbType.NVarChar),
                    new SqlParameter("@IsForbid", SqlDbType.VarChar,1)};
            parameters[0].Value = model.ParcelCode;
            parameters[1].Value = model.CountryCode;
            parameters[2].Value = model.ParcelName;
            parameters[3].Value = model.Remark;
            parameters[4].Value = model.IsForbid;

            int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            if (rows > 0)
                return true;
            else
                return false;
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:29,代码来源:TDY_Parcel.cs

示例5: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.T_UserInGroup model)
        {
            //model.UserCode=GetMaxId();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into T_UserInGroup(");
            strSql.Append("UserCode,UGrpCode,SysCode)");
            strSql.Append(" values (");
            strSql.Append("@UserCode,@UGrpCode,@SysCode)");
            SqlParameter[] parameters = {
                    new SqlParameter("@UserCode", SqlDbType.VarChar,20),
                    new SqlParameter("@UGrpCode", SqlDbType.VarChar,10),
                    new SqlParameter("@SysCode", SqlDbType.VarChar,50)};
            parameters[0].Value = model.UserCode;
            parameters[1].Value = model.UGrpCode;
            parameters[2].Value = model.SysCode;

            int iAffected = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (iAffected > 0)
            {
                return model.UserCode;
            }
            else
            {
                return string.Empty;
            }
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:30,代码来源:T_UserInGroup.cs

示例6: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.T_UserGroup model)
        {
            //model.UGrpCode=GetMaxId();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into T_UserGroup(");
            strSql.Append("UGrpCode,UGrpName,UGrpType,IsForbid,Remark,SysCode)");
            strSql.Append(" values (");
            strSql.Append("@UGrpCode,@UGrpName,@UGrpType,@IsForbid,@Remark,@SysCode)");
            SqlParameter[] parameters = {
                    new SqlParameter("@UGrpCode", SqlDbType.VarChar,10),
                    new SqlParameter("@UGrpName", SqlDbType.NVarChar),
                    new SqlParameter("@UGrpType", SqlDbType.VarChar,1),
                    new SqlParameter("@IsForbid", SqlDbType.VarChar,1),
                    new SqlParameter("@Remark", SqlDbType.NVarChar),
                    new SqlParameter("@SysCode", SqlDbType.VarChar,10)};
            parameters[0].Value = model.UGrpCode;
            parameters[1].Value = model.UGrpName;
            parameters[2].Value = model.UGrpType;
            parameters[3].Value = model.IsForbid;
            parameters[4].Value = model.Remark;
            parameters[5].Value = model.SysCode;

            int iAffected = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (iAffected > 0)
            {
                return model.UGrpCode;
            }
            else
            {
                return string.Empty;
            }
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:36,代码来源:T_UserGroup.cs

示例7: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public void Add(CoalTraffic.Model.TT_WaterBook model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TT_WaterBook(");
            strSql.Append("TradeCode,CollCode,JournalCode,StartMoney,TradeMoney,EndMoney,Operator,TradeDate,TradeKind,Remark,WeightCode)");
            strSql.Append(" values (");
            strSql.Append("@TradeCode,@CollCode,@JournalCode,@StartMoney,@TradeMoney,@EndMoney,@Operator,@TradeDate,@TradeKind,@Remark,@WeightCode)");
            SqlParameter[] parameters = {
                    new SqlParameter("@TradeCode", SqlDbType.VarChar,20),
                    new SqlParameter("@CollCode", SqlDbType.VarChar,10),
                    new SqlParameter("@JournalCode", SqlDbType.Int,4),
                    new SqlParameter("@StartMoney", SqlDbType.Decimal,9),
                    new SqlParameter("@TradeMoney", SqlDbType.Decimal,9),
                    new SqlParameter("@EndMoney", SqlDbType.Decimal,9),
                    new SqlParameter("@Operator", SqlDbType.NVarChar,20),
                    new SqlParameter("@TradeDate", SqlDbType.DateTime),
                    new SqlParameter("@TradeKind", SqlDbType.VarChar,10),
                    new SqlParameter("@Remark", SqlDbType.NVarChar,200),
                    new SqlParameter("@WeightCode", SqlDbType.VarChar,20)};
            parameters[0].Value = model.TradeCode;
            parameters[1].Value = model.CollCode;
            parameters[2].Value = model.JournalCode;
            parameters[3].Value = model.StartMoney;
            parameters[4].Value = model.TradeMoney;
            parameters[5].Value = model.EndMoney;
            parameters[6].Value = model.Operator;
            parameters[7].Value = model.TradeDate;
            parameters[8].Value = model.TradeKind;
            parameters[9].Value = model.Remark;
            parameters[10].Value = model.WeightCode;

            DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
        }
开发者ID:SaintLoong,项目名称:YaoXian_CoalTraffic-CS-,代码行数:36,代码来源:TT_WaterBook.cs

示例8: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public int Add(CoalTraffic.Model.TT_NavicertLog model)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TT_NavicertLog(");
            strSql.Append("NavicertCode,BeforeState,AfterState,Event,Remark,Operator,OperateDate)");
            strSql.Append(" values (");
            strSql.Append("@NavicertCode,@BeforeState,@AfterState,@Event,@Remark,@Operator,@OperateDate)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@NavicertCode", SqlDbType.VarChar,20),
                    new SqlParameter("@BeforeState", SqlDbType.VarChar,1),
                    new SqlParameter("@AfterState", SqlDbType.VarChar,1),
                    new SqlParameter("@Event", SqlDbType.NVarChar,50),
                    new SqlParameter("@Remark", SqlDbType.NVarChar,200),
                    new SqlParameter("@Operator", SqlDbType.NVarChar,20),
                    new SqlParameter("@OperateDate", SqlDbType.DateTime)};
            parameters[0].Value = model.NavicertCode;
            parameters[1].Value = model.BeforeState;
            parameters[2].Value = model.AfterState;
            parameters[3].Value = model.Event;
            parameters[4].Value = model.Remark;
            parameters[5].Value = model.Operator;
            parameters[6].Value = model.OperateDate;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
            if (obj == null)
            {
                return 1;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
开发者ID:SaintLoong,项目名称:YaoXian_CoalTraffic-CS-,代码行数:37,代码来源:TT_NavicertLog.cs

示例9: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.TT_CheckBang model)
        {
            #region �س���Ʊ

            SqlParameter[] parameters = {
                    new SqlParameter("@CheckCode", SqlDbType.VarChar,20),
                    new SqlParameter("@WeightCode", SqlDbType.VarChar,20),
                    new SqlParameter("@NavicertCode", SqlDbType.VarChar,20),
                    new SqlParameter("@MarkedCardCode", SqlDbType.VarChar,20),
                    new SqlParameter("@NetWeight", SqlDbType.Decimal,9),

                    new SqlParameter("@RoomCode", SqlDbType.VarChar,10),
                    new SqlParameter("@IsPassed", SqlDbType.VarChar,1),
                    new SqlParameter("@CheckResult", SqlDbType.NVarChar,200),
                    new SqlParameter("@CheckTime", SqlDbType.DateTime),
                    new SqlParameter("@Operator", SqlDbType.NVarChar,20),

                    new SqlParameter("@FrontImage", SqlDbType.VarChar,32),
                    new SqlParameter("@FrontImageContent",SqlDbType.Image),
                    new SqlParameter("@BackImage", SqlDbType.VarChar,32),
                    new SqlParameter("@BackImageContent", SqlDbType.Image),
                    new SqlParameter("@UpImage", SqlDbType.VarChar,32),

                    new SqlParameter("@UpImageContent", SqlDbType.Image),
                    new SqlParameter("@RoomImage", SqlDbType.VarChar,32),
                    new SqlParameter("@RoomImageContent", SqlDbType.Image)
                                        };
            parameters[0].Value = model.CheckCode;
            parameters[1].Value = model.WeightCode;
            parameters[2].Value = model.NavicertCode;
            parameters[3].Value = model.MarkedCardCode;
            parameters[4].Value = model.NetWeight;
            parameters[5].Value = model.RoomCode;
            parameters[6].Value = model.IsPassed;
            parameters[7].Value = model.CheckResult;
            parameters[8].Value = model.CheckTime;
            parameters[9].Value = model.Operator;
            parameters[10].Value = model.FrontImage;
            parameters[11].Value = model.FrontImageContent;
            parameters[12].Value = model.BackImage;
            parameters[13].Value = model.BackImageContent;
            parameters[14].Value = model.UpImage;
            parameters[15].Value = model.UpImageContent;
            parameters[16].Value = model.RoomImage;
            parameters[17].Value = model.RoomImageContent;
            #endregion

            try
            {
                DataSet ds = DbHelperSQL.RunProcedure("PT_CheckBang", parameters, "TT_CheckBang");
                if (ds != null)
                    return ds.Tables[0].Rows[0][0].ToString();
                else
                    return "";
            }
            catch
            {
                return "";
            }
        }
开发者ID:SaintLoong,项目名称:YaoXian_CoalTraffic-CS-,代码行数:63,代码来源:TT_CheckBang.cs

示例10: Add

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public string Add(CoalTraffic.Model.TDY_MarkedCardActive model)
        {
            //model.ActivationCode=GetMaxId();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into TDY_MarkedCardActive(");
            strSql.Append("ActivationCode,MarkedCardCode,CardKind,CardCode,CardState,ActivationAmount,ActivationTime,Operation)");
            strSql.Append(" values (");
            strSql.Append("@ActivationCode,@MarkedCardCode,@CardKind,@CardCode,@CardState,@ActivationAmount,@ActivationTime,@Operation)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ActivationCode", SqlDbType.VarChar,10),
                    new SqlParameter("@MarkedCardCode", SqlDbType.VarChar,20),
                    new SqlParameter("@CardKind", SqlDbType.VarChar,1),
                    new SqlParameter("@CardCode", SqlDbType.NVarChar),
                    new SqlParameter("@CardState", SqlDbType.VarChar,1),
                    new SqlParameter("@ActivationAmount", SqlDbType.Int,4),
                    new SqlParameter("@ActivationTime", SqlDbType.DateTime),
                    new SqlParameter("@Operation", SqlDbType.NVarChar)};
            parameters[0].Value = model.ActivationCode;
            parameters[1].Value = model.MarkedCardCode;
            parameters[2].Value = model.CardKind;
            parameters[3].Value = model.CardCode;
            parameters[4].Value = model.CardState;
            parameters[5].Value = model.ActivationAmount;
            parameters[6].Value = model.ActivationTime;
            parameters[7].Value = model.Operation;

            DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            return model.ActivationCode;
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:32,代码来源:TDY_MarkedCardActive.cs

示例11: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.TDY_Position model)
        {
            try
            {
                //model.PositionCode=GetMaxId();
                StringBuilder strSql = new StringBuilder();
                strSql.Append("insert into TDY_Position(");
                strSql.Append("PositionCode,PositionName,DepartCode,Remark,Rights,IsForbid)");
                strSql.Append(" values (");
                strSql.Append("@PositionCode,@PositionName,@DepartCode,@Remark,@Rights,@IsForbid)");
                SqlParameter[] parameters = {
                    new SqlParameter("@PositionCode", SqlDbType.NVarChar),
                    new SqlParameter("@PositionName", SqlDbType.NVarChar),
                    new SqlParameter("@DepartCode", SqlDbType.NVarChar),
                    new SqlParameter("@Remark", SqlDbType.NVarChar),
                    new SqlParameter("@Rights", SqlDbType.NVarChar),
                    new SqlParameter("@IsForbid", SqlDbType.VarChar,1)};
                parameters[0].Value = model.PositionCode;
                parameters[1].Value = model.PositionName;
                parameters[2].Value = model.DepartCode;
                parameters[3].Value = model.Remark;
                parameters[4].Value = model.Rights;
                parameters[5].Value = model.IsForbid;

                DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
                return model.PositionCode;
            }
            catch
            {
                return "";
            }
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:35,代码来源:TDY_Position.cs

示例12: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.TDY_IdentifierClip model)
        {
            //model.MarkedCardCode=GetMaxId();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into TDY_IdentifierClip(");
            strSql.Append("CoalKindCode,CollCode,DispathCardCode,MarkedCard,MarkedCardState,IsForbid,CardType)");
            strSql.Append(" values (");
            strSql.Append("@CoalKindCode,@CollCode,@DispathCardCode,@MarkedCard,@MarkedCardState,@IsForbid,@CardType)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
                    new SqlParameter("@CoalKindCode", SqlDbType.VarChar,10),
                    new SqlParameter("@CollCode", SqlDbType.VarChar,10),
                    new SqlParameter("@DispathCardCode", SqlDbType.VarChar,10),
                    new SqlParameter("@MarkedCard", SqlDbType.NVarChar,20),
                    new SqlParameter("@MarkedCardState", SqlDbType.VarChar,1),
                    new SqlParameter("@IsForbid", SqlDbType.VarChar,1),
                    new SqlParameter("@CardType", SqlDbType.VarChar,1)};
            parameters[0].Value = model.CoalKindCode;
            parameters[1].Value = model.CollCode;
            parameters[2].Value = model.DispathCardCode;
            parameters[3].Value = model.MarkedCard;
            parameters[4].Value = model.MarkedCardState;
            parameters[5].Value = model.IsForbid;
            parameters[6].Value = model.CardType;

            DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            return model.MarkedCardCode.ToString();
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:31,代码来源:TDY_IdentifierClip.cs

示例13: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.TDY_SendCard model)
        {
            //model.DispathCardCode=GetMaxId();
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TDY_SendCard(");
            strSql.Append("DispathCardCode,Amount,Buyer,Operator,BuyTime,DepartCode,IsForbid,CoalCode,CoalKindCode)");
            strSql.Append(" values (");
            strSql.Append("@DispathCardCode,@Amount,@Buyer,@Operator,@BuyTime,@DepartCode,@IsForbid,@CoalCode,@CoalKindCode)");
            SqlParameter[] parameters = {
                    new SqlParameter("@DispathCardCode", SqlDbType.VarChar,20),
                    new SqlParameter("@Amount", SqlDbType.Decimal,9),
                    new SqlParameter("@Buyer", SqlDbType.NVarChar),
                    new SqlParameter("@Operator", SqlDbType.NVarChar),
                    new SqlParameter("@BuyTime", SqlDbType.DateTime),
                    new SqlParameter("@DepartCode", SqlDbType.VarChar,10),
                    new SqlParameter("@IsForbid", SqlDbType.VarChar,1),
                    new SqlParameter("@CoalCode", SqlDbType.VarChar,10),
                    new SqlParameter("@CoalKindCode", SqlDbType.VarChar,10)};
            parameters[0].Value = model.DispathCardCode;
            parameters[1].Value = model.Amount;
            parameters[2].Value = model.Buyer;
            parameters[3].Value = model.Operator;
            parameters[4].Value = model.BuyTime;
            parameters[5].Value = model.DepartCode;
            parameters[6].Value = model.IsForbid;
            parameters[7].Value = model.CoalCode;
            parameters[8].Value = model.CoalKindCode;

            DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            return model.DispathCardCode;
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:34,代码来源:TDY_SendCard.cs

示例14: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.TDY_GFItems model)
        {
            //model.ItemCode=GetMaxId();
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TDY_GFItems(");
            strSql.Append("ItemCode,ItemName,IsStat,IsForbid,Remark)");
            strSql.Append(" values (");
            strSql.Append("@ItemCode,@ItemName,@IsStat,@IsForbid,@Remark)");
            SqlParameter[] parameters = {
                    new SqlParameter("@ItemCode", SqlDbType.VarChar,10),
                    new SqlParameter("@ItemName", SqlDbType.NVarChar),
                    new SqlParameter("@IsStat", SqlDbType.VarChar,1),
                    new SqlParameter("@IsForbid", SqlDbType.VarChar,1),
                    new SqlParameter("@Remark", SqlDbType.NVarChar)};
            parameters[0].Value = model.ItemCode;
            parameters[1].Value = model.ItemName;
            parameters[2].Value = model.IsStat;
            parameters[3].Value = model.IsForbid;
            parameters[4].Value = model.Remark;

            int iAffected = DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);

            if (iAffected > 0)
            {
                return model.ItemCode;
            }
            else
            {
                return string.Empty;
            }
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:34,代码来源:TDY_GFItems.cs

示例15: Add

        /// <summary>
        /// ����һ������
        /// </summary>
        public string Add(CoalTraffic.Model.TDY_EmptyAgainBang model)
        {
            //model.AgainCode=GetMaxId();
            StringBuilder strSql=new StringBuilder();
            strSql.Append("insert into TDY_EmptyAgainBang(");
            strSql.Append("AgainCode,EmptyCode,Proceduce,AgainReason,AgainType,FormerlyWeight,RoomCode,Operator,AgainTime)");
            strSql.Append(" values (");
            strSql.Append("@AgainCode,@EmptyCode,@Proceduce,@AgainReason,@AgainType,@FormerlyWeight,@RoomCode,@Operator,@AgainTime)");
            SqlParameter[] parameters = {
                    new SqlParameter("@AgainCode", SqlDbType.VarChar,20),
                    new SqlParameter("@EmptyCode", SqlDbType.VarChar,20),
                    new SqlParameter("@Proceduce", SqlDbType.Decimal,9),
                    new SqlParameter("@AgainReason", SqlDbType.NVarChar),
                    new SqlParameter("@AgainType", SqlDbType.VarChar,1),
                    new SqlParameter("@FormerlyWeight", SqlDbType.Decimal,5),
                    new SqlParameter("@RoomCode", SqlDbType.VarChar,10),
                    new SqlParameter("@Operator", SqlDbType.NVarChar),
                    new SqlParameter("@AgainTime", SqlDbType.DateTime)};
            parameters[0].Value = model.AgainCode;
            parameters[1].Value = model.EmptyCode;
            parameters[2].Value = model.Proceduce;
            parameters[3].Value = model.AgainReason;
            parameters[4].Value = model.AgainType;
            parameters[5].Value = model.FormerlyWeight;
            parameters[6].Value = model.RoomCode;
            parameters[7].Value = model.Operator;
            parameters[8].Value = model.AgainTime;

            DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
            return model.AgainCode;
        }
开发者ID:SaintLoong,项目名称:XunYi_CoalTraffic_Ebiao,代码行数:34,代码来源:TDY_EmptyAgainBang.cs


注:本文中的CoalTraffic类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。