예제 #1
0
        public static void DeleteSubGroup(string scode)
        {
            SPAccess sp = new SPAccess(DbConfig.GetConStr("MAINDB"));

            sp.Add("@S_CODE", typeof(System.String), scode);
            sp.ExecuteNonQuery("spDeleteFASubGroup");
        }
예제 #2
0
        public static DataTable ListGroup()
        {
            SPAccess sp = new SPAccess(DbConfig.GetConStr("MAINDB"));
            DataSet  ds = sp.Execute("spListFAGroup");

            return(ds.Tables[0]);
        }
예제 #3
0
        internal Account(SPAccess SPAccess, global::SPAccess.UserIdentity userIdentity)
            : base(SPAccess)
        {
            this.userIdentity = userIdentity;

            group = new Group(this.SPAccess, userIdentity.GroupIdentity.First());
        }
예제 #4
0
파일: SPContext.cs 프로젝트: DK189/SPAccess
        private SPContext(SPAccess SPAccess)
        {
            _Current = this;

            this.SPAccess      = SPAccess;
            this.CookieManager = new CookieManager(this);

            LoadAllPermission();
        }
예제 #5
0
        public static DataTable GetGroup(string acode)
        {
            SPAccess sp = new SPAccess(DbConfig.GetConStr("MAINDB"));

            sp.Add("@A_CODE", typeof(System.String), acode);

            DataSet ds = sp.Execute("spGetFAGroup");

            return(ds.Tables[0]);
        }
예제 #6
0
        public static DataTable GetJournal(String JId)
        {
            SPAccess sp = new SPAccess(DbConfig.GetConStr("MAINDB"));

            sp.Add("@J_ID", typeof(System.String), JId);

            DataSet ds = sp.Execute("spGetJMaster");

            return(ds.Tables[0]);
        }
예제 #7
0
        public static void UpdateGroup(string acode, string adesc, string type, decimal curbal)
        {
            SPAccess sp = new SPAccess(DbConfig.GetConStr("MAINDB"));

            sp.Add("@A_CODE", typeof(System.String), acode);
            sp.Add("@A_DESC", typeof(System.String), adesc);
            sp.Add("@A_TYPE", typeof(System.String), type);
            sp.Add("@A_CURRB", typeof(System.Decimal), curbal);

            sp.ExecuteNonQuery("spUpdateFAGroup");
        }
예제 #8
0
        public static void UpdateSubGroup(string scode, string sdesc, string stype, decimal opbal, string drcr, string flag)
        {
            SPAccess sp = new SPAccess(DbConfig.GetConStr("MAINDB"));

            sp.Add("@S_CODE", typeof(System.String), scode);
            sp.Add("@S_DESC", typeof(System.String), sdesc);
            sp.Add("@S_TYPE", typeof(System.String), stype);
            sp.Add("@S_OPBAL", typeof(System.String), opbal);
            sp.Add("@S_DRCR", typeof(System.String), drcr);
            sp.Add("@S_FLAG", typeof(System.String), flag);
            sp.ExecuteNonQuery("spUpdateFASubGroup");
        }
예제 #9
0
파일: SPContext.cs 프로젝트: DK189/SPAccess
        public bool Login(string Username, string Password)
        {
            try
            {
                var session = SPAccess.LoginByUser(Username, Password);
                CookieManager.Token = session.Token;
            }
            catch (Exception ex)
            {
#if DEBUG
                throw ex;
#endif
            }
            return(false);
        }
예제 #10
0
파일: SPContext.cs 프로젝트: DK189/SPAccess
        /// <summary>
        /// Hàm xử lý đăng xuất phiên làm việc hiện tại
        /// </summary>
        /// <returns></returns>
        public bool Logout()
        {
            try
            {
                if (SPAccess.Logout(Session))
                {
                    SessionCache.Remove(CookieManager.Token);
                    CookieManager.Token = "Việt Nam Vô Địch!";
                    return(true);
                }
            }
            catch (Exception ex)
            {
#if DEBUG
                throw ex;
#endif
            }
            return(false);
        }
예제 #11
0
 internal Group(SPAccess SPAccess, global::SPAccess.GroupIdentity groupIdentity)
     : base(SPAccess)
 {
     this.groupIdentity = groupIdentity;
 }
예제 #12
0
 internal Session(SPAccess SPAccess, global::SPAccess.Session session)
     : base(SPAccess)
 {
     this.session = session;
     this.account = new Account(this.SPAccess, session.UserIdentity);
 }
예제 #13
0
파일: SPModel.cs 프로젝트: DK189/SPAccess
 internal SPModel(SPAccess SPAccess)
 {
     this.SPAccess = SPAccess;
 }
예제 #14
0
 internal Permission(SPAccess SPAccess, PermissionIdentity perm)
     : base(SPAccess)
 {
     permissionIdentity = perm;
 }