コード例 #1
0
        public static IncidentDS.IncidentDSDataTable SelectIncident(Int32 incidentId)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;
            return(ta.GetData(incidentId));
        }
コード例 #2
0
        public static IncidentDS.IncidentDSDataTable GetIncidentByGuid(Guid incidentGuid)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;
            return(ta.GetIncidentByGuid(incidentGuid));
        }
コード例 #3
0
        public static IncidentDS.IncidentDSDataTable GetIncidentFollowUpList(Int32 statusId, Int32 agentId)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;
            return(ta.GetIncidentFollowUpList(statusId, agentId));
        }
コード例 #4
0
        public static IncidentDS.IncidentDSDataTable GetIncidentsByContact(Int32 statusId, Int32 contactId)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;
            return(ta.GetIncidentsByContact(statusId, contactId));
        }
コード例 #5
0
        public static IncidentDS.IncidentDSDataTable OpenFollowUpIncident(Int32 incidentId, Int32 agentId)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;
            return(ta.OpenFollowUp(incidentId, agentId));
        }
コード例 #6
0
        public static Int32 DeleteIncident(Int32 incidentId)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;
            return(ta.Delete(incidentId));
        }
コード例 #7
0
        public static Int32 UpdateIncident(Int32 incidentId, Int32 contactId, Int32 agentId, Int32 statusId, string subject)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;


            System.Nullable <Int32> contact_id = Helper.ResolveEmptyInt(contactId);
            System.Nullable <Int32> agent_id   = Helper.ResolveEmptyInt(agentId);



            return(ta.Update(incidentId, contact_id, agent_id, statusId, subject));
        }
コード例 #8
0
        public static Int32 InsertIncident(Int32 groupId, Int32 skillId, Int32 langId, Int32 facilityId, Int32 contactId, Int32 agentId)
        {
            IncidentDSTableAdapter ta = new IncidentDSTableAdapter();

            ta.Connection.ConnectionString = UcConnection.ConnectionString;


            System.Nullable <Int32> group_id    = Helper.ResolveEmptyInt(groupId);
            System.Nullable <Int32> skill_id    = Helper.ResolveEmptyInt(skillId);
            System.Nullable <Int32> lang_id     = Helper.ResolveEmptyInt(langId);
            System.Nullable <Int32> facility_id = Helper.ResolveEmptyInt(facilityId);
            System.Nullable <Int32> contact_id  = Helper.ResolveEmptyInt(contactId);
            System.Nullable <Int32> agent_id    = Helper.ResolveEmptyInt(agentId);



            int id = Convert.ToInt32(ta.InsertIncident(group_id, skill_id, lang_id, facility_id, contact_id, agent_id));

            return(id);
        }