public void DeleteLob(LOBViewModel lobViewModel) { try { tbl_LOB tblLOB = new tbl_LOB(); tblLOB.LobID = lobViewModel.lobID; tblLOB.daId = lobViewModel.DAID; tblLOB.EntityState = DA.DomainModel.EntityState.Deleted; LOBManager lobManager = new LOBManager(); lobManager.DeleteLOB(tblLOB); } catch (Exception) { throw; } }
public LOBViewModel FindLob(int?lobID) { try { LOBViewModel lobViewModel = new LOBViewModel(); LOBManager lobManager = new LOBManager(); var lob = lobManager.FindLOB(lobID); lobViewModel.lobID = lob.LobID; lobViewModel.lobDesc = lob.LobDesc; lobViewModel.DAID = lob.daId;//1; return(lobViewModel); } catch (Exception) { throw; } }
public void AddLOB(LOBViewModel lobViewModel) { try { tbl_LOB tblLOB = new tbl_LOB(); tblLOB.LobDesc = lobViewModel.lobDesc; tblLOB.daId = lobViewModel.DAID;//1; tblLOB.EntityState = DA.DomainModel.EntityState.Added; LOBManager lobManager = new LOBManager(); lobManager.AddLOB(tblLOB); } catch (Exception) { throw; } }
public void GetLobDetails(int daId) { try { LOBManager lobManager = new LOBManager(); var lobList = lobManager.GetLOBDetails(daId); LobList = new List <LOBViewModel>(); foreach (var item in lobList) { LOBViewModel lobViewModel = new LOBViewModel(); lobViewModel.lobID = item.LobID; lobViewModel.lobDesc = item.LobDesc; lobViewModel.DAID = item.daId;//1; LobList.Add(lobViewModel); } } catch (Exception) { throw; } }