Ejemplo n.º 1
0
        /// <summary>
        /// 获取 Sys_Login_Account 登录用户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Model.M_Sys_Login_Account GetLoginAcc(string id)
        {
            BLL.CRUD biz = new BLL.CRUD(DbVendor.Oracle, Runtime.OracleConnStrLocal, false);

            try
            {
                BLL.Clause c = new BLL.Clause();
                c.Add("trim(LoginName)", id);
                List <Model.M_Sys_Login_Account> etylist = biz.Retrieve <Model.M_Sys_Login_Account>(c.Get());
                biz.Commit();

                if (etylist.Count > 0)
                {
                    return(etylist[0]);
                }
                else
                {
                    return(new Model.M_Sys_Login_Account());
                }
            }
            catch (Exception)
            {
                biz.Abort();
                throw;
            }
        }