Exemplo n.º 1
0
        //Updated AccessName on edit Click
        public async Task <string> UpdateAccessName(UpdateAccessNameDomainModel model)
        {
            using (var _context = new YSCMEntities())
            {
                try
                {
                    var obj = _context.AccessNames.Where(e => e.AccessNameID == model.AccessNameID).FirstOrDefault <AccessName>();


                    if (obj != null)
                    {
                        obj.AccessName1 = model.AccessName;
                        obj.updatedBy   = model.updatedBy;
                        obj.updatedDate = DateTime.Now;
                        await _context.SaveChangesAsync();
                    }
                    else
                    {
                        return("No Record Found");
                    }
                    return("Data Updated Successfully");
                }
                catch (Exception ex)
                { throw ex; }
            }
        }
Exemplo n.º 2
0
        public async Task <string> UpdateAccessName([FromBody] UpdateAccessNameDomainModel model)
        {
            var result = await _iConfigAccessInterface.UpdateAccessName(model);

            return(result);
        }
Exemplo n.º 3
0
 public Task <string> UpdateAccessName(UpdateAccessNameDomainModel model)
 {
     return(_iConfigAccessInterfaceDA.UpdateAccessName(model));
 }