Beispiel #1
0
        public static int InsertParams(DataRow r)
        {
            SqlParameter[] ps;
            string         cmd = DataUtil.BuildInsertSQL(r, out ps);

            return(ExecuteNone(cmd, ps));
        }
Beispiel #2
0
 public void AddInsertData(DataTable dt)
 {
     foreach (DataRow r in dt.Rows)
     {
         patchSQL.Append(DataUtil.BuildInsertSQL(r));
     }
 }
Beispiel #3
0
        public static void Insert(params DataRow[] rs)
        {
            StringBuilder b = new StringBuilder();

            foreach (DataRow r in rs)
            {
                b.Append(DataUtil.BuildInsertSQL(r));
            }
            ExecuteTrans(b.ToString());
        }
Beispiel #4
0
        public int Insert(params DataRow[] rs)
        {
            StringBuilder b = new StringBuilder();

            foreach (DataRow r in rs)
            {
                if (r != null)
                {
                    b.Append(DataUtil.BuildInsertSQL(r));
                }
            }
            return((int)DataBase.ExecuteNone(b.ToString()));
        }
Beispiel #5
0
 public virtual string GetInsertSQL()
 {
     return(DataUtil.BuildInsertSQL(this));
 }
Beispiel #6
0
 public int Insert(DataTable t)
 {
     return((int)DataBase.ExecuteNone(DataUtil.BuildInsertSQL(t)));
 }
Beispiel #7
0
 public int Insert(DataRow r)
 {
     return((int)DataBase.ExecuteNone(DataUtil.BuildInsertSQL(r)));
 }
Beispiel #8
0
        //public int DeleteParams(DataRow r) {
        //    OleDbParameter[] ps;
        //    string cmd = DataUtil.BuildDeleteSQL(r, out ps);
        //    return (int)DataBase.ExecuteNone(cmd, ps);
        //}
        #endregion

        #region Select
        //代码已经重构,参见DataBase中的Select操作
        #endregion

        public void AddInsertData(DataRow r)
        {
            patchSQL.Append(DataUtil.BuildInsertSQL(r));
        }
Beispiel #9
0
 /// <summary>
 /// 对传入的DataSet插入数据
 /// </summary>
 /// <param name="ds"></param>
 public static void Insert(DataSet ds)
 {
     ExecuteTrans(DataUtil.BuildInsertSQL(ds));
 }
Beispiel #10
0
 public static void Insert(DataTable t)
 {
     ExecuteTrans(DataUtil.BuildInsertSQL(t));
 }
Beispiel #11
0
 public static int Insert(DataRow r)
 {
     return(ExecuteNone(DataUtil.BuildInsertSQL(r)));
 }