Link to home
Start Free TrialLog in
Avatar of mathieu_cupryk
mathieu_cuprykFlag for Canada

asked on

Create a dataset from a bo.

I have a bo.

  public class Ticket
    {


        private int? ticketID = 0;
        private string ticketNumber = "";
        private string ticketType = "";
        private string ticketStatus = "";
        private string ticketSeverity = "";
        private string shortDescription = "";
        private string externalTicket = "";
        private string reasonMenu = "";
        private string problemNote = "";
        private string solutionNote = "";
        private string actionNote = "";
        private string followupNote = "";
        private bool? companiesFlag = false;
        private string agentCreated = "";
        private DateTime? dateCreated = System.DateTime.Now;
        private DateTime? dateLastModified = System.DateTime.Now;
        private string agentClosed = "";
        private DateTime? dateClosed = System.DateTime.Now;
        private string agentFollowup = "";
        private DateTime? followupBy = System.DateTime.Now;
        private bool? deletedFlag = false;
        private string ticketTypeOld = "";
        private string assignedTo = "";
        private string requestType = "";
        private string serviceImpact = "";
        private DateTime? dateTimeAssigned = System.DateTime.Now;
        private string priority = "";
        private DateTime? dateAssigned = System.DateTime.Now;
        private string trackIt = "";
        private string contactMethod = "";
        private string locationSIMs = "";
        private string userID = "";
        private string ticketApplicationType = "";
        private int? accountID = 0;

        #region Properties
        public System.Int32? TicketID
        {
            get
            {
                return ticketID;
            }
            set
            {
                ticketID = value;
            }
        }

        public System.String TicketNumber
        {
            get
            {
                return ticketNumber;
            }
            set
            {
                ticketNumber = value;
            }
        }

        public System.String TicketType
        {
            get
            {
                return ticketType;
            }
            set
            {
                ticketType = value;
            }
        }

        public System.String TicketStatus
        {
            get
            {
                return ticketStatus;
            }
            set
            {
                ticketStatus = value;
            }
        }

        public System.String TicketSeverity
        {
            get
            {
                return ticketSeverity;
            }
            set
            {
                ticketSeverity = value;
            }
        }

        public System.String ShortDescription
        {
            get
            {
                return shortDescription;
            }
            set
            {
                shortDescription = value;
            }
        }

        public System.String ExternalTicket
        {
            get
            {
                return externalTicket;
            }
            set
            {
                externalTicket = value;
            }
        }

        public System.String ReasonMenu
        {
            get
            {
                return reasonMenu;
            }
            set
            {
                reasonMenu = value;
            }
        }

        public System.String ProblemNote
        {
            get
            {
                return problemNote;
            }
            set
            {
                problemNote = value;
            }
        }

        public System.String SolutionNote
        {
            get
            {
                return solutionNote;
            }
            set
            {
                solutionNote = value;
            }
        }

        public System.String ActionNote
        {
            get
            {
                return actionNote;
            }
            set
            {
                actionNote = value;
            }
        }

        public System.String FollowupNote
        {
            get
            {
                return followupNote;
            }
            set
            {
                followupNote = value;
            }
        }

        public System.Boolean? CompaniesFlag
        {
            get
            {
                return companiesFlag;
            }
            set
            {
                companiesFlag = value;
            }
        }

        public System.String AgentCreated
        {
            get
            {
                return agentCreated;
            }
            set
            {
                agentCreated = value;
            }
        }

        public System.DateTime? DateCreated
        {
            get
            {
                return dateCreated;
            }
            set
            {
                dateCreated = value;
            }
        }

        public System.DateTime? DateLastModified
        {
            get
            {
                return dateLastModified;
            }
            set
            {
                dateLastModified = value;
            }
        }

        public System.String AgentClosed
        {
            get
            {
                return agentClosed;
            }
            set
            {
                agentClosed = value;
            }
        }

        public System.DateTime? DateClosed
        {
            get
            {
                return dateClosed;
            }
            set
            {
                dateClosed = value;
            }
        }

        public System.String AgentFollowup
        {
            get
            {
                return agentFollowup;
            }
            set
            {
                agentFollowup = value;
            }
        }

        public System.DateTime? FollowupBy
        {
            get
            {
                return followupBy;
            }
            set
            {
                followupBy = value;
            }
        }

        public System.Boolean? DeletedFlag
        {
            get
            {
                return deletedFlag;
            }
            set
            {
                deletedFlag = value;
            }
        }

        public System.String TicketTypeOld
        {
            get
            {
                return ticketTypeOld;
            }
            set
            {
                ticketTypeOld = value;
            }
        }

        public System.String AssignedTo
        {
            get
            {
                return assignedTo;
            }
            set
            {
                assignedTo = value;
            }
        }

        public System.String RequestType
        {
            get
            {
                return requestType;
            }
            set
            {
                requestType = value;
            }
        }

        public System.String ServiceImpact
        {
            get
            {
                return serviceImpact;
            }
            set
            {
                serviceImpact = value;
            }
        }

        public System.DateTime? DateTimeAssigned
        {
            get
            {
                return dateTimeAssigned;
            }
            set
            {
                dateTimeAssigned = value;
            }
        }

        public System.String Priority
        {
            get
            {
                return priority;
            }
            set
            {
                priority = value;
            }
        }

        public System.DateTime? DateAssigned
        {
            get
            {
                return dateAssigned;
            }
            set
            {
                dateAssigned = value;
            }
        }

        public System.String TrackIt
        {
            get
            {
                return trackIt;
            }
            set
            {
                trackIt = value;
            }
        }

        public System.String ContactMethod
        {
            get
            {
                return contactMethod;
            }
            set
            {
                contactMethod = value;
            }
        }

        public System.String LocationSIMs
        {
            get
            {
                return locationSIMs;
            }
            set
            {
                locationSIMs = value;
            }
        }

        public System.String UserID
        {
            get
            {
                return userID;
            }
            set
            {
                userID = value;
            }
        }

        public System.String TicketApplicationType
        {
            get
            {
                return ticketApplicationType;
            }
            set
            {
                ticketApplicationType = value;
            }
        }

        public System.Int32? AccountID
        {
            get
            {
                return accountID;
            }
            set
            {
                accountID = value;
            }
        }
       
        #endregion
           
        #region "constructors"

        public Ticket(
            System.Int32  TicketID,
            System.String TicketNumber,
            System.String TicketType,
            System.String TicketStatus,
            System.String ticketSeverity,
            System.String shortDescription,
            System.String externalTicket,
            System.String reasonMenu,
            System.String problemNote,
            System.String solutionNote,
            System.String actionNote,
            System.String followupNote,
            System.Boolean? companiesFlag,
            System.String agentCreated,
            System.DateTime? dateCreated,
            System.DateTime? dateLastModified,
            System.String agentClosed,
            System.DateTime? dateClosed,
            System.String agentFollowup,
            System.DateTime? followupBy,
            System.Boolean? deletedFlag,
            System.String ticketTypeOld,
            System.String assignedTo,
            System.String requestType,
            System.String serviceImpact,
            System.DateTime? dateTimeAssigned,
            System.String priority,
            System.DateTime? dateAssigned,
            System.String trackIt,
            System.String contactMethod,
            System.String locationSIMs,
            System.String userID,
            System.String ticketApplicationType,
            System.Int32? accountID)
          {
                ticketID = TicketID;
                ticketNumber = TicketNumber;
                ticketType = TicketType;
                ticketStatus = TicketStatus;
                ticketSeverity = TicketSeverity;
                shortDescription = ShortDescription;
                externalTicket = ExternalTicket;
                reasonMenu = ReasonMenu;
                problemNote = ProblemNote;
                solutionNote = SolutionNote;
                actionNote = ActionNote;
                followupNote = FollowupNote;
                companiesFlag = CompaniesFlag;
                agentCreated = AgentCreated;
                dateCreated = DateCreated;
                dateLastModified = DateLastModified;
                agentClosed = AgentClosed;
                dateClosed = DateClosed;
                agentFollowup = AgentFollowup;
                followupBy = FollowupBy;
                deletedFlag = DeletedFlag;
                ticketTypeOld = TicketTypeOld;
                assignedTo = AssignedTo;
                requestType = RequestType;
                serviceImpact = ServiceImpact;
                dateTimeAssigned = DateTimeAssigned;
                priority = Priority;
                dateAssigned = DateAssigned;
                trackIt = TrackIt;
                contactMethod = ContactMethod;
                locationSIMs = LocationSIMs;
                userID = UserID;
                ticketApplicationType = TicketApplicationType;
                accountID = AccountID;
       
        }
       
        #endregion

    }
}

======================================================================
I need to dataset from the above object.
ASKER CERTIFIED SOLUTION
Avatar of tillgeffken
tillgeffken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mathieu_cupryk

ASKER

I plan to get the data from a form and then do an insert into the database using a DataSet using Enterprise Library.