ToSIPDialPlan() 공개 메소드

public ToSIPDialPlan ( ) : SIPDialPlan
리턴 SIPDialPlan
예제 #1
0
        public JSONResult<string> AddDialPlan(SIPDialPlanJSON sipDialPlan)
        {
            try
            {
                var customer = AuthoriseRequest();

                if (sipDialPlan.ScriptTypeDescription.IsNullOrBlank())
                {
                    sipDialPlan.ScriptTypeDescription = SIPDialPlanScriptTypesEnum.Ruby.ToString();
                }

                SIPDialPlan entityDialPlan = sipDialPlan.ToSIPDialPlan();
                m_service.InsertSIPDialPlan(customer.Name, entityDialPlan);

                return new JSONResult<string>() { Success = true, Result = entityDialPlan.ID };
            }
            catch (Exception excp)
            {
                return new JSONResult<string>() { Success = false, Error = excp.Message };
            }
        }
예제 #2
0
        public JSONResult<string> UpdateDialPlan(SIPDialPlanJSON sipDialPlan)
        {
            try
            {
                var customer = AuthoriseRequest();

                SIPDialPlan entityDialPlan = sipDialPlan.ToSIPDialPlan();
                m_service.UpdateSIPDialPlan(customer.Name, entityDialPlan);

                return new JSONResult<string>() { Success = true, Result = entityDialPlan.ID };
            }
            catch (Exception excp)
            {
                return new JSONResult<string>() { Success = false, Error = excp.Message };
            }
        }