public int AddGRN(GRN user) { user.GRNCreatedDate = DateTime.Now; int id = 0; try { id = _repository.AddGRN(user); } catch (Exception ex) { throw ex; } return(id); }