public string GetListLocationMenu() { try { List <tb_location_menu> lstlocationMenu = new List <tb_location_menu>(); lstlocationMenu = _locationDAO.GetListLocationMenu(); LocationMenu locationMenuModel; List <LocationMenu> lstLocationMenu = new List <LocationMenu>(); for (int i = 0; i < lstlocationMenu.Count; i++) { locationMenuModel = new LocationMenu(); locationMenuModel.LocationMenuID = lstlocationMenu[i].location_menu_id; locationMenuModel.ProductID = lstlocationMenu[i].product_id ?? -1; locationMenuModel.LocationTabID = lstlocationMenu[i].location_tab_id ?? -1; locationMenuModel.Column = lstlocationMenu[i].column_no ?? -1; locationMenuModel.Row = lstlocationMenu[i].row_no ?? -1; lstLocationMenu.Add(locationMenuModel); } return(JsonConvert.SerializeObject(lstLocationMenu)); } catch (Exception ex) { log.Error("BussicnessLogic => GetListOfTable" + ex.Message); return(null); } }
public int UpdateLocationMenu(string stringJson) { try { LocationMenu locationMenu = JsonConvert.DeserializeObject <LocationMenu>(stringJson); return(_locationDAO.UpdateLocationMenu(locationMenu.LocationMenuID, locationMenu.ProductID, locationMenu.LocationTabID, locationMenu.Column, locationMenu.Row)); } catch (Exception ex) { log.Error("BussicnessLogic => UpdateTable" + ex.Message); return(-1); } }
public int AddLocationMenu(string stringJson) { try { log.Info("BusinessLogic => AddLocationMenu - Begin"); LocationMenu locationMenu = JsonConvert.DeserializeObject <LocationMenu>(stringJson); return(_locationDAO.AddLocationMenu(locationMenu.ProductID, locationMenu.LocationTabID, locationMenu.Column, locationMenu.Row)); } catch (Exception ex) { log.Error("BussicnessLogic => AddLocationMenu" + ex.Message); return(-1); } }