コード例 #1
0
 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;
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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;
            }
        }