public static DataSet Retrieves() { ConnectionFactory Connection = InternalGlobal.MakeConnectionFactory(); PrWorkstation dworkstation = new PrWorkstation(Connection); DataSet ret = null; try { Connection.Open(); ret = dworkstation.Retrieves(); } catch (Exception exp) { throw exp; } finally { Connection.Close(); } return ret; }
public static Workstation GetWorkstasion(int workstationId) { Workstation wkt = new Workstation(); ConnectionFactory Connection = InternalGlobal.MakeConnectionFactory(); PrWorkstation dworkstation = new PrWorkstation(Connection); Connection.Open(); DataRow dr = dworkstation.Retrieves(workstationId); Connection.Close(); wkt.WorkstationId = (int)dr["WORKSTATION_ID"]; wkt.WorkstationCode = (string)dr["CODE"]; wkt.Name= (string)dr["NAME"]; wkt.Password = (string)dr["PASSWORD"]; wkt.IPAddress = (string)dr["IP"]; wkt.UnitManager = (string)dr["UNIT_MANAGER"]; wkt.Address = (string)dr["ADDRESS"]; wkt.PhoneNumber = (string)dr["TEL"]; wkt.AdminName = (string)dr["ADMIN_NAME"]; wkt.AdminPhone = (string)dr["ADMIN_TEL"]; wkt.AreaId = (int)dr["AREA_ID"]; return wkt; }