Esempio n. 1
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 /// <param name="tableName">表名</param>
 /// <param name="pkName">主键名</param>
 /// <param name="pkValue">主键值</param>
 /// <returns></returns>
 public bool DeleteData(string tableName, string pkName, string pkValue)
 {
     if (string.IsNullOrWhiteSpace(tableName) || string.IsNullOrWhiteSpace(pkName) || string.IsNullOrWhiteSpace(pkValue))
     {
         return(false);
     }
     return(TmoServiceClient.InvokeServerMethodT <bool>(funCode.FakeEntity_DeleteData, tableName, pkName, pkValue));
 }
Esempio n. 2
0
 /// <summary>
 /// 获取表中下个主键ID
 /// </summary>
 /// <param name="tableName">表名</param>
 /// <param name="pkName">主键名字</param>
 /// <returns></returns>
 public string GetNextID(string tableName, string pkName, int startId = 1, bool receyle = true)
 {
     if (string.IsNullOrWhiteSpace(tableName) || string.IsNullOrWhiteSpace(pkName))
     {
         return("err_表名或者主键名为空");
     }
     return(TmoServiceClient.InvokeServerMethodT <string>(funCode.GetNextID, tableName, pkName, startId, receyle));
 }
Esempio n. 3
0
        /// <summary>
        /// 判断是否存在相同值
        /// </summary>
        /// <param name="tableName">表名</param>
        /// <param name="column">列名</param>
        /// <param name="value">值</param>
        /// <param name="falseDel">包含假删除判断</param>
        /// <returns></returns>
        public bool ExistSameValue(string tableName, string column, string value, string where = null, bool falseDel = true)
        {
            if (string.IsNullOrWhiteSpace(tableName) || string.IsNullOrWhiteSpace(column) || string.IsNullOrWhiteSpace(value))
            {
                return(true);
            }

            return(TmoServiceClient.InvokeServerMethodT <bool>(funCode.FakeEntity_ExistSameValue, tableName, column, value, where, falseDel));
        }
Esempio n. 4
0
        /// <summary>
        /// 提交实体数据
        /// </summary>
        /// <param name="submitParams"></param>
        /// <returns></returns>
        public bool SubmitData(FE_SubmitDataParam submitParams)
        {
            if (submitParams == null)
            {
                return(false);
            }
            bool suc = TmoServiceClient.InvokeServerMethodT <bool>(funCode.FakeEntity_SubmitDataNew, submitParams);

            return(suc);
        }
Esempio n. 5
0
        /// <summary>
        /// 获取表结构
        /// </summary>
        /// <param name="tableName"></param>
        /// <returns></returns>
        public DataTable GetTableStruct(string tableName)
        {
            if (string.IsNullOrWhiteSpace(tableName))
            {
                return(null);
            }
            DataTable dt = TmoServiceClient.InvokeServerMethodT <DataTable>(funCode.FakeEntity_GetTableStruct, tableName);

            return(dt);
        }
Esempio n. 6
0
 /// <summary>
 /// 获取实体数据
 /// </summary>
 /// <param name="getDataParam"></param>
 /// <returns></returns>
 public DataSet GetData(FE_GetDataParam getDataParam)
 {
     return(TmoServiceClient.InvokeServerMethodT <DataSet>(funCode.FakeEntity_GetDataNew, getDataParam));
 }