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


C# SYSModel.UserIDOP类代码示例

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


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

示例1: TryCallWCFFunc

       public static bool TryCallWCFFunc(string OPNameStr, ReqeFunStruct requestObj, out RespFunStruct responseObj)
       {
           UserIDOP userOP = new UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = OPNameStr };
           requestObj.userIDOP = userOP;
           requestObj.PCClientCookieStr = GlobalStaticObj.CookieStr;
           RespFunStruct returnObj = new RespFunStruct();
           string requestStr = HXCCommon.DotNetEncrypt.DESEncrypt.Encrypt(Newtonsoft.Json.JsonConvert.SerializeObject(requestObj));
           if (!WCFClientProxy.TestPCClientProxy())
           {
               returnObj.IsSuccess = "0";
               returnObj.ReturnObject = "未能建立同服务器连接";
               responseObj = returnObj;
               MessageBox.Show("未能建立同服务器连接!");
               return false;
           }
           try
           {
               string ResultStr = GlobalStaticObj.proxy.JsonOperate(requestStr);
               string Str = HXCCommon.DotNetEncrypt.DESEncrypt.Decrypt(ResultStr);
               responseObj = JsonConvert.DeserializeObject<RespFunStruct>(Str);
               return true;
           }
           catch (Exception ex)
           {
               returnObj.IsSuccess = "0";
               returnObj.ReturnObject = "发生错误";
               returnObj.Msg = ex.Message;
               responseObj = returnObj;
               MessageBox.Show("发生错误!");
               return false;
           }

       }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:33,代码来源:CommonFuncCall.cs

示例2: GetListPages

        /// <summary>
        /// 调用分页存储过程返回得到的数据集
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <param name="tableSource"></param>
        /// <param name="whereValue"></param>
        /// <param name="OrderExpression"></param>
        /// <param name="Fields"></param>
        /// <returns></returns>
        public static DataSet GetListPages(string connString, int page, int pageSize, string tableSource, string whereValue, string OrderExpression, string Fields, UserIDOP userID, ref int Counts)
        {
            SqlParameter[] parm = new SqlParameter[]
		    {
			    new SqlParameter("@TableSource", SqlDbType.VarChar, 1000),
			    new SqlParameter("@SelectList", SqlDbType.VarChar, 2000),
			    new SqlParameter("@SearchCondition", SqlDbType.VarChar, 4000),
			    new SqlParameter("@OrderExpression", SqlDbType.VarChar, 100),
			    new SqlParameter("@PageIndex", SqlDbType.Int, 4),
			    new SqlParameter("@PageSize", SqlDbType.Int, 4),
                new SqlParameter("@Counts", SqlDbType.Int, 4)
		    };

            parm[0].Value = tableSource;
            parm[1].Value = Fields;
            parm[2].Value = whereValue;
            parm[3].Value = OrderExpression;
            parm[4].Value = page;
            parm[5].Value = pageSize;

            parm[parm.Length - 1].Direction = ParameterDirection.Output;
            DataSet ds = new DataSet();
            ds = DBUtility.SqlHelper.ExecuteDataSet(connString, CommandType.StoredProcedure, "[dbo].[list_page_tables]", userID, parm);
            Counts = Convert.ToInt32(parm[parm.Length - 1].Value);

            return ds;
        }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:37,代码来源:ListPage.cs

示例3: UpdateByHashtableLog

 /// <summary> 日志的更新操作,千万不要再次进行写日志操作
 /// </summary>
 public static int UpdateByHashtableLog(UserIDOP userID, string connString, string tableName, string pkName, string pkVal, Dictionary<string, string> ht)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append(" Update ");
     sb.Append(tableName);
     sb.Append(" Set ");
     bool isFirstValue = true;
     foreach (string key in ht.Keys)
     {
         if (isFirstValue)
         {
             isFirstValue = false;
             sb.Append(key);
             sb.Append("=");
             sb.Append("@" + key);
         }
         else
         {
             sb.Append("," + key);
             sb.Append("=");
             sb.Append("@" + key);
         }
     }
     sb.Append(" Where ").Append(pkName).Append("=").Append("@" + pkName).Append(";"); ;
     ht[pkName] = pkVal;
     SqlParameter[] _params = SqlHelper.GetParameter(ht);
     object _object = SqlHelper.ExecuteNonQueryNoBak(connString, CommandType.Text, sb.ToString(), userID, _params);
     return (_object == DBNull.Value) ? 0 : Convert.ToInt32(_object);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:31,代码来源:SqlHelper.cs

示例4: GetSingleValue

 /// <summary> 查询单个字段的值(一般求最大,最小值)
 /// <param name="opName">操作名</param>
 /// <param name="tableName">表名</param>
 /// <param name="field">单个查询字段</param>
 /// <param name="orderBy">排序字段,多个以“,”分割</param>
 /// </summary>
 /// <returns>返回Value</returns>
 public static string GetSingleValue(string opName, string currAccDbName, string tableName, string field, string where, string orderBy)
 {
     StringBuilder strBuilder = new StringBuilder();
     strBuilder.Append("select " + field);
     if (!string.IsNullOrEmpty(tableName))
     {
         strBuilder.Append(" from  " + tableName);
         if (!string.IsNullOrEmpty(where))
         {
             strBuilder.Append(" where  " + where);
         }
         if (!string.IsNullOrEmpty(orderBy))
         {
             strBuilder.Append(" order by  " + orderBy);
         }
     }
     Dictionary<string, ParamObj> dic = new Dictionary<string, ParamObj>();
     UserIDOP userOp = new UserIDOP() { UserID = GlobalStaticObj_Server.Instance.UserID, OPName = opName };
     string connString = LocalVariable.GetConnString(currAccDbName, ConfigConst.ConnectionStringReadonly);
     object obj = DbCommon.Instance.ExecuteNonQueryReturnObjectNoTrans(connString, CommandType.Text, strBuilder.ToString(), dic, userOp);
     if (obj == null)
     {
         return "";
     }
     return obj.ToString();
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:33,代码来源:DBHelper.cs

示例5: Submit_AddOrEditLog

 /// <summary> 日志的更新操作,千万不要再次进行写日志操作
 /// </summary>
 public static bool Submit_AddOrEditLog(UserIDOP userID, string connString, string tableName, string pkName, string pkVal, Dictionary<string, string> ht)
 {
     if (string.IsNullOrEmpty(pkVal))
     {
         if (SqlHelper.InsertByHashtableLog(userID, connString, tableName, ht) > 0)
             return true;
         else
             return false;
     }
     else
     {
         if (SqlHelper.UpdateByHashtableLog(userID, connString, tableName, pkName, pkVal, ht) > 0)
             return true;
         else
             return false;
     }
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:19,代码来源:SqlHelper.cs

示例6: InsertByHashtableLog

 /// <summary> 日志的更新操作,千万不要再次进行写日志操作
 /// </summary>
 public static int InsertByHashtableLog(UserIDOP userID, string connString, string tableName, Dictionary<string, string> ht)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append(" Insert Into ");
     sb.Append(tableName);
     sb.Append("(");
     StringBuilder sp = new StringBuilder();
     StringBuilder sb_prame = new StringBuilder();
     foreach (string key in ht.Keys)
     {
         sb_prame.Append("," + key);
         sp.Append(",@" + key);
     }
     sb.Append(sb_prame.ToString().Substring(1, sb_prame.ToString().Length - 1) + ") Values (");
     sb.Append(sp.ToString().Substring(1, sp.ToString().Length - 1) + ")").Append(";");
     int _object = SqlHelper.ExecuteNonQueryNoBak(connString, CommandType.Text, sb.ToString(), userID, SqlHelper.GetParameter(ht));
     return _object;
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:20,代码来源:SqlHelper.cs

示例7: Submit_AddOrEdit

 /// <summary> 新增或更新
 /// </summary>
 /// <param name="opName">操作名</param>
 /// <param name="accCode">帐套代码</param>
 /// <param name="tableName">表名</param>
 /// <param name="keyName">主键名称</param>
 /// <param name="keyValue">主键值,如果有值,表示更新记录</param>
 /// <param name="dicFileds">字段集合</param>
 /// <returns>返回执行是否成功</returns>
 public static bool Submit_AddOrEdit(string opName, string accCode, string tableName, string keyName, string keyValue, Dictionary<string, string> dicFileds)
 {
     ReqeFunStruct reqeFunStruct = new ReqeFunStruct();
     reqeFunStruct.SubSysName = SubSysName.CommonBaseFuncCall;
     reqeFunStruct.FunName = ComFunCallEnum.Submit_AddOrEdit;
     reqeFunStruct.AccCode = accCode;
     Submit_AddOrEdit submit_AddOrEdit = new Submit_AddOrEdit();
     submit_AddOrEdit.TableName = string.Format("{0}", tableName);
     submit_AddOrEdit.DicParam = dicFileds;
     submit_AddOrEdit.pkName = keyName;//默认第一个
     submit_AddOrEdit.pkVal = keyValue;
     reqeFunStruct.FunObject = submit_AddOrEdit;
     UserIDOP userOp = new UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = opName };
     reqeFunStruct.userIDOP = userOp;
     reqeFunStruct.PCClientCookieStr = GlobalStaticObj.CookieStr;
     var addStr = HXCCommon.DotNetEncrypt.DESEncrypt.Encrypt(Newtonsoft.Json.JsonConvert.SerializeObject(reqeFunStruct));
     var respO = JsonOperate(addStr);
     if (respO.IsSuccess == "0")
     {
         return false;
     }
     return bool.Parse(respO.ReturnObject);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:32,代码来源:DBHelper.cs

示例8: DeleteDataByID

 /// <summary> 删除 BYID
 /// </summary>
 /// <param name="opName">操作名</param>
 /// <param name="accCode">帐套代码</param>
 /// <param name="tableName">表名</param>
 /// <param name="keyName">键名称</param>
 /// <param name="keyValue">键值</param>
 /// <returns></returns>
 public static bool DeleteDataByID(string opName, string accCode, string tableName, string keyName, string keyValue)
 {
     ReqeFunStruct reqeFunStruct = new ReqeFunStruct();
     reqeFunStruct.SubSysName = SubSysName.CommonBaseFuncCall;
     reqeFunStruct.FunName = ComFunCallEnum.DeleteDataByID;
     reqeFunStruct.AccCode = accCode;
     DeleteDataByID DeleteDataByID = new DeleteDataByID();
     DeleteDataByID.TableName = string.Format("{0}", tableName);
     DeleteDataByID.pkName = keyName;//默认第一个
     DeleteDataByID.pkVal = keyValue;
     reqeFunStruct.FunObject = DeleteDataByID;
     UserIDOP userOp = new UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = opName };
     reqeFunStruct.userIDOP = userOp;
     reqeFunStruct.PCClientCookieStr = GlobalStaticObj.CookieStr;
     var addStr = HXCCommon.DotNetEncrypt.DESEncrypt.Encrypt(Newtonsoft.Json.JsonConvert.SerializeObject(reqeFunStruct));
     var respO = JsonOperate(addStr);
     if (respO.IsSuccess == "0")
     {
         return false;
     }
     return bool.Parse(respO.ReturnObject);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:30,代码来源:DBHelper.cs

示例9: LogFunctionCall

 public static void LogFunctionCall(string fun_id, string setbook_id)
 {
     ReqeFunStruct reqeFunStruct = new ReqeFunStruct();
     reqeFunStruct.SubSysName = SubSysName.ExtendBaseFuncCall;
     reqeFunStruct.FunName = ComFunCallEnum.LogFunctionCall;
     reqeFunStruct.AccCode = GlobalStaticObj.CurrAccCode;
     UserFunctionOPLog FunctionOP_Add = new UserFunctionOPLog();
     FunctionOP_Add.com_id = GlobalStaticObj.CurrUserCom_Id;
     FunctionOP_Add.fun_id = fun_id;           
     FunctionOP_Add.access_time = Common.LocalDateTimeToUtcLong(GlobalStaticObj.CurrentDateTime);
     FunctionOP_Add.userOP = new SYSModel.UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = "菜单功能操作日志" };
     reqeFunStruct.FunObject = FunctionOP_Add;
     UserIDOP userOp = new SYSModel.UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = "菜单功能操作日志" };
     reqeFunStruct.userIDOP = userOp;
     reqeFunStruct.PCClientCookieStr = GlobalStaticObj.CookieStr;
     string addStr = HXCCommon.DotNetEncrypt.DESEncrypt.Encrypt(Newtonsoft.Json.JsonConvert.SerializeObject(reqeFunStruct));
     if (!WCFClientProxy.TestDataProxy())
     {
         throw new Exception("未能建立同服务器连接!");
     }
     GlobalStaticObj.proxy.JsonOperate(addStr);           
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:22,代码来源:DBHelper.cs

示例10: GetSingleValue

 /// <summary> 查询单个字段的值(一般求最大,最小值)
 /// <param name="opName">操作名</param>
 /// <param name="accCode">帐套代码</param>
 /// <param name="tableName">表名</param>
 /// <param name="field">单个查询字段</param>
 /// <param name="orderBy">排序字段,多个以“,”分割</param>
 /// </summary>
 /// <returns>返回Value</returns>
 public static string GetSingleValue(string opName, string accCode, string tableName, string field, string where, string orderBy)
 {
     ReqeFunStruct reqeFunStruct = new ReqeFunStruct();
     reqeFunStruct.SubSysName = SubSysName.CommonBaseFuncCall;
     reqeFunStruct.FunName = ComFunCallEnum.ExecuteNonQueryReturnObjectNoTrans;
     reqeFunStruct.AccCode = accCode;
     SQLObj sqlObj = new SQLObj();
     sqlObj.cmdType = CommandType.Text;
     StringBuilder strBuilder = new StringBuilder();
     strBuilder.Append("select " + field);
     if (!string.IsNullOrEmpty(tableName))
     {
         strBuilder.Append(" from  " + tableName);
         if (!string.IsNullOrEmpty(where))
         {
             strBuilder.Append(" where  " + where);
         }
         if (!string.IsNullOrEmpty(orderBy))
         {
             strBuilder.Append(" order by  " + orderBy);
         }
     }
     sqlObj.sqlString = strBuilder.ToString();
     sqlObj.Param = new Dictionary<string, ParamObj>();
     ExecuteNonQueryReturnDataSetNoTrans executeNonQueryReturnDataSetNoTrans = new ExecuteNonQueryReturnDataSetNoTrans();
     executeNonQueryReturnDataSetNoTrans.ReadOnlyFlag = true;
     executeNonQueryReturnDataSetNoTrans.sqlObj = sqlObj;
     reqeFunStruct.FunObject = executeNonQueryReturnDataSetNoTrans;
     UserIDOP userOp = new UserIDOP() { UserID = GlobalStaticObj.UserID, OPName = opName };
     reqeFunStruct.userIDOP = userOp;
     reqeFunStruct.PCClientCookieStr = GlobalStaticObj.CookieStr;
     var addStr = HXCCommon.DotNetEncrypt.DESEncrypt.Encrypt(Newtonsoft.Json.JsonConvert.SerializeObject(reqeFunStruct));
     var respO = JsonOperate(addStr);
     if (respO.IsSuccess == "0")
     {
         return "";
     }
     return respO.ReturnObject;
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:47,代码来源:DBHelper.cs

示例11: IsExist

 public int IsExist(string connStr, string tableName, string pkName, string pkVal, UserIDOP userID)
 {
     return  DBUtility.SqlHelper.IsExist(connStr, tableName, pkName, pkVal, userID);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:4,代码来源:ManageSql.cs

示例12: BatchDeleteDataByWhere

 /// <summary> 批量删除 - where
 /// </summary>
 public static int BatchDeleteDataByWhere(string connStr, string tableName, string whereString, UserIDOP userID)
 {
     StringBuilder sb = new StringBuilder("Delete From " + tableName + " Where " + whereString).Append(";");
     return SqlHelper.ExecuteNonQueryTran(connStr, CommandType.Text, sb.ToString(), userID, null);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:7,代码来源:SqlHelper.cs

示例13: BatchUpdateDataMultiByTrans

 /// <summary> 批量更新- 多条语句-事务
 /// </summary
 public static int BatchUpdateDataMultiByTrans(string connStr, IList<UpdateSQLObj> batUpdateList, UserIDOP userID)
 {
     StringBuilder sb = new StringBuilder();
     List<SqlParameter> paramList = new List<SqlParameter>();
     string str = string.Empty;
     int index = 0;
     foreach (UpdateSQLObj sqlObj in batUpdateList)
     {
         sb.Append(" Update ");
         sb.Append(sqlObj.TableName);
         sb.Append(" Set ");
         bool isFirstValue = true;
         foreach (string key in sqlObj.DicParam.Keys)
         {
             if (isFirstValue)
             {
                 isFirstValue = false;
                 sb.Append(key);
                 sb.Append("=");
                 sb.Append("@Param" + index.ToString());
             }
             else
             {
                 sb.Append("," + key);
                 sb.Append("=");
                 sb.Append("@Param" + index.ToString());
             }
             paramList.Add(new SqlParameter("@Param" + index.ToString(), sqlObj.DicParam[key]));
             index++;
         }
         if (sqlObj.pkName != null)
         {
             sb.Append(" Where ").Append(sqlObj.pkName).Append("=").Append("@Param" + index.ToString()).Append(";");
             paramList.Add(new SqlParameter("@Param" + index.ToString(), sqlObj.pkVal));
             index++;
         }
         else if (!string.IsNullOrEmpty(sqlObj.whereString))
         {
             sb.Append(" Where ").Append(sqlObj.whereString).Append(";");
         }
     }
     object _object = SqlHelper.ExecuteNonQueryTran(connStr, CommandType.Text, sb.ToString(), userID, paramList.ToArray());
     return (_object == DBNull.Value) ? 0 : Convert.ToInt32(_object);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:46,代码来源:SqlHelper.cs

示例14: GetDataTable

 public DataTable GetDataTable(string connStr,string tableName, UserIDOP userID)
 {
     return DBUtility.SqlHelper.GetDataTable(connStr, tableName, userID);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:4,代码来源:ManageSql.cs

示例15: BatchUpdateDataByWhere

 /// <summary> 批量更新- where
 /// </summary>
 public static int BatchUpdateDataByWhere(string connStr, string tableName, Dictionary<string, string> ht, string whereString, UserIDOP userID)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append(" Update ");
     sb.Append(tableName);
     sb.Append(" Set ");
     bool isFirstValue = true;
     foreach (string key in ht.Keys)
     {
         if (isFirstValue)
         {
             isFirstValue = false;
             sb.Append(key);
             sb.Append("=");
             sb.Append("@" + key);
         }
         else
         {
             sb.Append("," + key);
             sb.Append("=");
             sb.Append("@" + key);
         }
     }
     sb.Append(" Where ").Append(whereString).Append(";"); ;
     SqlParameter[] _params = SqlHelper.GetParameter(ht);
     object _object = SqlHelper.ExecuteNonQueryTran(connStr, CommandType.Text, sb.ToString(), userID, _params);
     return (_object == DBNull.Value) ? 0 : Convert.ToInt32(_object);
 }
开发者ID:caocf,项目名称:workspace-kepler,代码行数:30,代码来源:SqlHelper.cs


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