コード例 #1
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(string GUID, string UID, TB_RoleFunctionEntity UEntity)
        {
            //更新数据
            int result = dal.Update(UEntity);

            //检测执行结果
            CheckResult(result, "");
        }
コード例 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(TB_RoleFunctionEntity Entity)
 {
     SqlParameter[] sqlParameters =
     {
         new SqlParameter("@Id",         Entity.Id),
         new SqlParameter("@BusCode",    Entity.BusCode),
         new SqlParameter("@StoCode",    Entity.StoCode),
         new SqlParameter("@CCode",      Entity.CCode),
         new SqlParameter("@CCname",     Entity.CCname),
         new SqlParameter("@RoleId",     Entity.RoleId),
         new SqlParameter("@FunctionId", Entity.FunctionId),
     };
     return(DBHelper.ExecuteNonQuery("dbo.p_TB_RoleFunction_Update", CommandType.StoredProcedure, sqlParameters));
 }
コード例 #3
0
        /// <summary>
        /// 单行数据转实体对象
        /// </summary>
        /// <param name="dr"></param>
        /// <returns></returns>
        private TB_RoleFunctionEntity SetEntityInfo(DataRow dr)
        {
            TB_RoleFunctionEntity Entity = new TB_RoleFunctionEntity();

            Entity.Id      = StringHelper.StringToLong(dr["Id"].ToString());
            Entity.BusCode = dr["BusCode"].ToString();
            Entity.StoCode = dr["StoCode"].ToString();
            Entity.CCode   = dr["CCode"].ToString();
            Entity.CCname  = dr["CCname"].ToString();

            Entity.RoleId     = StringHelper.StringToLong(dr["RoleId"].ToString());
            Entity.FunctionId = StringHelper.StringToLong(dr["FunctionId"].ToString());
            return(Entity);
        }
コード例 #4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(ref TB_RoleFunctionEntity Entity)
 {
     intReturn = 0;
     SqlParameter[] sqlParameters =
     {
         new SqlParameter("@Id",         Entity.Id),
         new SqlParameter("@BusCode",    Entity.BusCode),
         new SqlParameter("@StoCode",    Entity.StoCode),
         new SqlParameter("@CCode",      Entity.CCode),
         new SqlParameter("@CCname",     Entity.CCname),
         new SqlParameter("@RoleId",     Entity.RoleId),
         new SqlParameter("@FunctionId", Entity.FunctionId),
     };
     sqlParameters[0].Direction = ParameterDirection.Output;
     intReturn = DBHelper.ExecuteNonQuery("dbo.p_TB_RoleFunction_Add", CommandType.StoredProcedure, sqlParameters);
     if (intReturn == 0)
     {
         Entity.Id = int.Parse(sqlParameters[0].Value.ToString());
     }
     return(intReturn);
 }
コード例 #5
0
        /// <summary>
        /// 检验表单数据
        /// </summary>
        /// <returns></returns>
        public bool CheckPageInfo(string type, string Id, string BusCode, string StoCode, string CCname, string RoleId, string FunctionId, string CCode)
        {
            bool rel = false;

            try
            {
                Entity         = new TB_RoleFunctionEntity();
                Entity.Id      = StringHelper.StringToLong(Id);
                Entity.BusCode = BusCode;
                Entity.StoCode = StoCode;
                Entity.CCode   = CCode;
                Entity.CCname  = CCname;

                Entity.RoleId     = StringHelper.StringToLong(RoleId);
                Entity.FunctionId = StringHelper.StringToLong(FunctionId);
                rel = true;
            }
            catch (System.Exception)
            {
            }
            return(rel);
        }