Exemple #1
0
        /// <summary>
        /// 個人主檔裡面,是否為有班表人員
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        public static bool IsSchedulePerson(string username)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("/*PA51019 0=非排班、1=排班*/ ");
            sb.Append("select PA51001, PA51002, PA51004, PA51019 from hrs_mis.dbo.WPA51 ");
            sb.Append("where PA51001 = '" + Enterprise.ConStr_produceline + "' ");
            sb.Append("and PA51002 = '" + username + "' ");

            DataTable dt = BOSSQL.hrsExecuteQuery(sb.ToString());

            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["PA51019"].ToString() == "1")
                {
                    return(true);//有班表人員
                }
                else
                {
                    return(false);//無班表人員
                }
            }

            return(false);
        }
Exemple #2
0
        /// <summary>
        /// 取得當前使用者的 PAAK200 (權限)
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        public static string GetPAAK(string username)
        {
            string PAAK200 = BOSSQL.ExecuteQuery("select * from users join WPAAK on q1 = PAAK002 where username = '******'").Rows[0]["PAAK200"].ToString();

            return(PAAK200);
        }