using Newtonsoft.Json;
using WK_KLI_LAPS_Service.App_Data;
using WK_KLI_LAPS_Service.Models.Configuration;

namespace WK_KLI_LAPS_Service.Controllers.Configuration.Outline.OutlineStageMapping
{

    public interface IOutlineStageMappingService
    {
        object UpdateOutlineStageMapping(string inputstr, string mode);
        object Getbyoutlineconfigid(outlineStageMappingModel data, string mode);
    }
    public class OutlineStageMappingService : IOutlineStageMappingService
    {
        CommonRepository oCommonRepository = new CommonRepository();
        public object UpdateOutlineStageMapping(string inputstr, string mode)
        {
            return oCommonRepository.UpdateOutlineStageMapping(inputstr, mode);
        }
        //method to retrieve the workflow definition details based on workflow id
        public object Getbyoutlineconfigid(outlineStageMappingModel data, string mode)
        {
            string input = JsonConvert.SerializeObject(data);
            return oCommonRepository.ExecuteSP_ReturnList("spoutlineconfigstagemappingselect", input, mode);
        }
    }
}
