Beispiel #1
0
        public LifeCyclesViewModel GetTransactionsLifecycle(int?designAccelaratorID)
        {
            try
            {
                LifeCyclesViewModel lifecyclesviewmodel = new LifeCyclesViewModel();
                LifeCycleManager    lifecycleManager    = new LifeCycleManager();
                lifecyclesviewmodel.lstLifeCycles = lifecycleManager.GetLifeCycles(designAccelaratorID);

                return(lifecyclesviewmodel);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #2
0
        public LifeCyclesViewModel FindLifeCycles(int?lifeCycleID)
        {
            try
            {
                LifeCyclesViewModel lifecyclevm      = new LifeCyclesViewModel();
                LifeCycleManager    lifecycleManager = new LifeCycleManager();
                var lifecycle = lifecycleManager.FindLifeCycles(lifeCycleID);
                lifecyclevm.daid          = lifecycle.daId;
                lifecyclevm.LifeCycleID   = lifecycle.LifeCycleID;
                lifecyclevm.LifeCycleDesc = lifecycle.LifeCycleDesc;

                return(lifecyclevm);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #3
0
        public void AddLifeCycle(LifeCyclesViewModel lifecyclesviewmodel)
        {
            try
            {
                tbl_LifeCycle tbllifecycle = new tbl_LifeCycle();

                tbllifecycle.LifeCycleDesc = lifecyclesviewmodel.LifeCycleDesc;
                tbllifecycle.daId          = lifecyclesviewmodel.daid;
                tbllifecycle.EntityState   = DA.DomainModel.EntityState.Added;

                LifeCycleManager lifecycleManager = new LifeCycleManager();
                lifecycleManager.AddLifeCycle(tbllifecycle);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #4
0
        public bool DeleteLifeCycle(LifeCyclesViewModel lifecyclesviewmodel)
        {
            try
            {
                tbl_LifeCycle tbllifecycle = new tbl_LifeCycle();

                tbllifecycle.LifeCycleID = lifecyclesviewmodel.LifeCycleID;
                tbllifecycle.EntityState = DA.DomainModel.EntityState.Deleted;

                LifeCycleManager lifecycleManager = new LifeCycleManager();
                lifecycleManager.DeleteLifeCycle(tbllifecycle);

                return(true);
            }
            catch (Exception)
            {
                throw;
            }
        }