Beispiel #1
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DBTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static int createTicket(SendTicket tkt)
        {
            try
            {
                var grpID     = new MySqlParameter("?groupId", tkt.groupId);
                var profileId = new MySqlParameter("?memberProfileId", tkt.memberProfileId);
                var smsText   = new MySqlParameter("?smsText", tkt.smsText);
                var createBy  = new MySqlParameter("?createBy", tkt.createBy);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreCommand("CALL V2_USPAddTicket(?groupId,?memberProfileId,?smsText,?createBy)",
                                                             grpID, profileId, smsText, createBy);
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                GC.Collect();
            }
        }
Beispiel #2
0
        public static int createTicket(SendTicket tkt)
        {
            try
            {
                var grpID     = new MySqlParameter("?groupId", tkt.groupId);
                var profileId = new MySqlParameter("?memberProfileId", tkt.memberProfileId);
                var smsText   = new MySqlParameter("?smsText", tkt.smsText);
                var createBy  = new MySqlParameter("?createBy", tkt.createBy);

                var Result = _DBTouchbase.ExecuteStoreCommand("CALL V2_USPAddTicket(?groupId,?memberProfileId,?smsText,?createBy)",
                                                              grpID, profileId, smsText, createBy);
                return(Result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                GC.Collect();
            }
        }
Beispiel #3
0
        public object AddTicket(SendTicket addtkt)
        {
            dynamic TBAddTicketResult;

            try
            {
                int Result = Ticket.createTicket(addtkt);

                if (Result > 0)
                {
                    TBAddTicketResult = new { status = "0", message = "success" };
                }
                else
                {
                    TBAddTicketResult = new { status = "0", message = "Record not found" };
                }
            }
            catch
            {
                TBAddTicketResult = new { status = "1", message = "failed" };
            }

            return(new { TBAddTicketResult });
        }