예제 #1
0
        /// <summary>
        /// 用于一些无模型的数据写入(ZL_GroupModel)
        /// </summary>
        public static int Insert(string tbname, string fields, string values, SqlParameter[] sp = null)
        {
            SqlModel model = new SqlModel()
            {
                cmd = SqlCmd.Insert, tbName = tbname
            };

            model.fields = fields;
            model.values = values;
            model.AddSpToList(sp);
            return(DB.InsertID(model));
        }
예제 #2
0
파일: DBCenter.cs 프로젝트: baixue001/IPS
        public static int Insert(M_Base data, SqlBase db)
        {
            SqlModel model = new SqlModel()
            {
                cmd = SqlCmd.Insert, tbName = data.TbName, pk = data.PK
            };

            model.AddSpToList(data.GetParameters());
            model.fields = DB.GetFields(data);
            model.values = DB.GetParams(data);
            PreSPList(model);
            return(db.InsertID(model));
        }