Exemplo n.º 1
0
        public string GetListOfLocationTab()
        {
            try
            {
                List <tb_location_tab> lstLocationTab = new List <tb_location_tab>();
                lstLocationTab = _locationDAO.GetListOfLocationTab();
                LocationTab        locationTab;
                List <LocationTab> lstLocationTabModel = new List <LocationTab>();
                for (int i = 0; i < lstLocationTab.Count; i++)
                {
                    locationTab = new LocationTab();
                    locationTab.LocationTabID = lstLocationTab[i].location_tab_id;
                    locationTab.Name          = lstLocationTab[i].name;
                    locationTab.IsActive      = lstLocationTab[i].is_active ?? 0;
                    lstLocationTabModel.Add(locationTab);
                }

                return(JsonConvert.SerializeObject(lstLocationTabModel));
            }
            catch (Exception ex)
            {
                log.Error("BussicnessLogic => GetListOfLocationTab" + ex.Message);
                return(null);
            }
        }
Exemplo n.º 2
0
 public int UpdateLocationTab(string stringJSON)
 {
     try
     {
         log.Info("BusinessLogic => UpdateLocationTab - Begin");
         LocationTab locationTabModel = JsonConvert.DeserializeObject <LocationTab>(stringJSON);
         return(_locationDAO.UpdateLocationTab(locationTabModel.LocationTabID, locationTabModel.Name));
     }
     catch (Exception ex)
     {
         log.Error("BussicnessLogic => UpdateLocationTab" + ex.Message);
         return(-1);
     }
 }