Exemplo n.º 1
0
        // PUT: api/Unit/5
        //public ServerResponse Put([FromBody]Setting Setting)
        //{
        //    var res = new ServerResponse();
        //    using (SettingBL SettingBL = new SettingBL())
        //    {
        //        try
        //        {
        //            res.Data = SettingBL.UpdateSetting(Setting);
        //        }

        //        catch (Exception ex)
        //        {
        //            res.Success = false;
        //        }
        //    }
        //    return res;
        //}

        // DELETE: api/Unit/5
        public ServerResponse Delete(string id)
        {
            var res = new ServerResponse();

            using (SettingBL SettingBL = new SettingBL())
            {
                try
                {
                    res.Data = SettingBL.DeleteSetting(id);
                }

                catch (Exception ex)
                {
                    res.Success = false;
                }
            }
            return(res);
        }