private BusinessType CreateObject(IDataReader objReader) { BusinessType objBusinessType = new BusinessType(); NullManager reader = new NullManager(objReader); try { objBusinessType.BusinessTypeID = reader.GetInt32("BusinessTypeID"); objBusinessType.Name = reader.GetString("Name"); objBusinessType.CompanyID = reader.GetInt32("CompanyID"); objBusinessType.UserID = reader.GetInt32("UserID"); objBusinessType.ModifiedDate = reader.GetDateTime("ModifiedDate"); } catch (Exception Ex) { throw new Exception("Error while creating object" + Ex.Message); } return(objBusinessType); }
private Designation CreateObject(IDataReader oReader) { Designation objDesg = new Designation(); NullManager reader = new NullManager(oReader); try { objDesg.DesignationID = reader.GetInt32("DesignationID"); objDesg.DesignationName = reader.GetString("Name"); objDesg.PayScaleID = reader.GetInt32("PayScaleID"); objDesg.CompanyID = reader.GetInt32("CompanyID"); objDesg.UserID = reader.GetInt32("UserID"); objDesg.ModifiedDate = reader.GetDateTime("ModifiedDate"); } catch (Exception Ex) { throw new Exception("Error while creating object" + Ex.Message); } return(objDesg); }