Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="rsid"></param>
        /// <param name="puid"></param>
        /// <param name="exp"></param>
        /// <param name="tran"></param>
        /// <returns></returns>
        public static bool JoinToUser(int rsid, int puid, PExpress exp, QDbTran tran)
        {
            if (rsid == 0 || rsid == 0)
            {
                return(false);
            }

            Resource_LinkedM rl = new Resource_LinkedM();

            rl.RSID.Value       = rsid;
            rl.LK_OBJT.Value    = User.LK_OBJT;
            rl.LK_OBJT_ID.Value = puid;
            rl.LK_Operate.Value = "+";
            rl.P_Express.Value  = (byte)exp;

            if (rl.Where(rl.RSID == rsid)
                .And(rl.LK_OBJT == User.LK_OBJT)
                .And(rl.LK_OBJT_ID == puid).NoLock().Exists())
            {
                return(false);
            }
            else
            {
                return(rl.Insert(tran));
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 绑定委托数据
 /// </summary>
 /// <param name="get">委托数据源</param>
 /// <param name="src">源类型</param>
 public override void Bind(GetHandler get, SourceType src)
 {
     //1.get:获取数据的方法指针;src:当前提供get的源类型[DataBase|Entity|Collection]
     //
     RSID       = Eval <int>(get("RSID"));
     LK_OBJT    = Eval <int>(get("LK_OBJT"));
     LK_OBJT_ID = Eval <int>(get("LK_OBJT_ID"));
     LK_Operate = Eval <string>(get("LK_Operate"));
     P_Express  = Eval <PExpress>(get("P_Express"));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 绑定委托数据
        /// </summary>
        /// <param name="get">委托数据源</param>
        /// <param name="src">源类型</param>
        public override void Bind(GetHandler get, SourceType src)
        {
            PGID = Eval<int>(get("PGID"));
            PG_CN_Name = Eval<string>(get("PG_CN_Name"));
            PG_EN_Name = Eval<string>(get("PG_EN_Name"));
            PG_Order_Index = Eval<int>(get("PG_Order_Index"));

            LK_Operate = Eval<string>(get("LK_Operate"));
            LK_OBJT = Eval<int>(get("LK_OBJT"));
            P_Express = Eval<PExpress>(get("P_Express"));

            base.Bind(get, src);
        }
Ejemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="pgid"></param>
 /// <param name="exp"></param>
 /// <param name="tran"></param>
 /// <returns></returns>
 public bool JoinToGroup(int pgid, PExpress exp, QDbTran tran)
 {
     return(JoinToGroup(this.RSID, pgid, exp, tran));
 }
Ejemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="puid"></param>
 /// <param name="exp"></param>
 /// <param name="tran"></param>
 /// <returns></returns>
 public bool JoinToUser(int puid, PExpress exp, QDbTran tran)
 {
     return(JoinToUser(this.RSID, puid, exp, tran));
 }