public User GetUserLogon(string UserName) { try { string _MacAddress = new dcClientWorkStation().GetRegisteredMacAddress(); SQLServer.Procedure p = new SQLServer.Procedure("dbo.SelectLogon"); p.Parameters.Add("p_UserName", UserName); p.Parameters.Add("p_WSMacAddress", _MacAddress); return(new dcUser().GetInfo(p)); } catch (Exception ex) { throw ex; } }
public ClientWorkStation GetClientByRegCode(string RegCode) { try { SQLServer.Procedure _proc = new SQLServer.Procedure("dbo.SelectClients"); _proc.Parameters.Add("p_RegCode", RegCode); return(this.GetInfo(_proc)); } catch (SqlException ex) { if (ex.Number == 11001) { return(new ClientWorkStation()); } else { throw ex; } } }