public DAViewModel FindDA(int?daID) { try { DAViewModel dAViewModel = new DAViewModel(); DAManager daManager = new DAManager(); var da = daManager.FindDA(daID); dAViewModel.DAID = da.daid; dAViewModel.DAName = da.daName; dAViewModel.ModuleId = (int)da.ModuleId; return(dAViewModel); } catch (Exception) { throw; } }
public void AddDA(DAViewModel daViewModel) { try { tbl_DesignAccelerator tblDesignAccelerator = new tbl_DesignAccelerator(); tblDesignAccelerator.daName = daViewModel.DAName; tblDesignAccelerator.ModuleId = daViewModel.ModuleId; tblDesignAccelerator.dacomplete = "0"; tblDesignAccelerator.EntityState = DA.DomainModel.EntityState.Added; DAManager daManager = new DAManager(); daManager.AddDA(tblDesignAccelerator); } catch (Exception) { throw; } }
public bool CheckDuplicate(DAViewModel daViewModel) { try { DAManager daManager = new DAManager(); var da = daManager.FindDAName(daViewModel.DAName, daViewModel.ModuleId); if (da != null && da.daid != daViewModel.DAID && da.daName.ToUpper() == daViewModel.DAName.ToUpper()) { return(true); } return(false); } catch (Exception) { throw; } }
public void GetDADetails(int appId) { try { DAManager daManager = new DAManager(); var dAList = daManager.GetDADetails(appId); DAList = new List <DAViewModel>(); foreach (var item in dAList) { DAViewModel dAViewModel = new DAViewModel(); dAViewModel.DAID = item.daid; dAViewModel.DAName = item.daName; DAList.Add(dAViewModel); } } catch (Exception) { throw; } }