Exemplo n.º 1
0
        internal CommonRequest Create(Employee4AccessVM model)
        {
            var url  = $"{this._apiUrl}/Employees/Create";
            var json = HttpConnector.Post(url, JsonConvert.SerializeObject(model), Encoding.UTF8);

            if (json.State == StateEnum.Timeout)
            {
                return(json);
            }
            return(JsonConvert.DeserializeObject <CommonRequest>(json.Message));
        }
Exemplo n.º 2
0
        internal CommonRequest Delete(int id)
        {
            var url  = $"{this._apiUrl}/Employees/Delete/{id}";
            var json = HttpConnector.Post(url, "", Encoding.UTF8);

            if (json.State == StateEnum.Success)
            {
                return(JsonConvert.DeserializeObject <CommonRequest>(json.Message));
            }

            return(json);
        }