private void AddPayData(List <PayTable> payDataList)
 {
     FormSample.PayTableDatabase d = new PayTableDatabase();
     foreach (var payData in payDataList)
     {
         d.SaveItem(payData);
     }
 }
        public async Task UpdatePaytableDataFromService()
        {
            // check whether data is already present in paytable data
            // If not call dataservce to get paytable data and dump into local db.
            FormSample.PayTableDatabase d = new PayTableDatabase();
            var payTableData = d.GetPayTables().ToList();

            if (payTableData.Any())
            {
                d.DeleteAll();
            }
            //if (!payTableData.Any ()) {
            var service = new PayTableDataService();
            var result  = await service.GetPayTableData(Settings.GeneralSettings);

            var p = result.ToList();

            if (p != null)
            {
                AddPayData(p);
            }
            //}
        }