Exemple #1
0
 public void UpdateDestination(tbl_Destination tblDestination)
 {
     try
     {
         IGenericDataRepository <tbl_Destination> repository = new GenericDataRepository <tbl_Destination>();
         repository.Update(tblDestination);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #2
0
 public void UpdateDistributionType(tbl_DistributionType tblDistributionType)
 {
     try
     {
         IGenericDataRepository <tbl_DistributionType> repository = new GenericDataRepository <tbl_DistributionType>();
         repository.Update(tblDistributionType);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #3
0
 public void UpdateLifeCycle(tbl_LifeCycle tblLifeCycles)
 {
     try
     {
         IGenericDataRepository <tbl_LifeCycle> repository = new GenericDataRepository <tbl_LifeCycle>();
         repository.Update(tblLifeCycles);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #4
0
 public void UpdateRoles(tbl_Roles tblRoles)
 {
     try
     {
         IGenericDataRepository <tbl_Roles> repository = new GenericDataRepository <tbl_Roles>();
         repository.Update(tblRoles);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #5
0
 public void UpdatePeriodType(tbl_PeriodType tblPeriodType)
 {
     try
     {
         IGenericDataRepository <tbl_PeriodType> repository = new GenericDataRepository <tbl_PeriodType>();
         repository.Update(tblPeriodType);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #6
0
 public void UpdateApplication(tbl_Applications tblApplications)
 {
     try
     {
         IGenericDataRepository <tbl_Applications> repository = new GenericDataRepository <tbl_Applications>();
         repository.Update(tblApplications);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #7
0
 public void UpdateProduct(tbl_Products tblProduct)
 {
     try
     {
         IGenericDataRepository <tbl_Products> repository = new GenericDataRepository <tbl_Products>();
         repository.Update(tblProduct);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #8
0
 public void UpdateSource(tbl_Source tblSource)
 {
     try
     {
         IGenericDataRepository <tbl_Source> repository = new GenericDataRepository <tbl_Source>();
         repository.Update(tblSource);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #9
0
 public void UpdateModule(tbl_Module tblModule)
 {
     try
     {
         IGenericDataRepository <tbl_Module> repository = new GenericDataRepository <tbl_Module>();
         repository.Update(tblModule);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #10
0
 public void UpdateBuzProd(tbl_BuzProd tblbuzprod)
 {
     try
     {
         IGenericDataRepository <tbl_BuzProd> repository = new GenericDataRepository <tbl_BuzProd>();
         repository.Update(tblbuzprod);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #11
0
 public void UpdateLOB(tbl_LOB tblLOB)
 {
     try
     {
         IGenericDataRepository <tbl_LOB> repository = new GenericDataRepository <tbl_LOB>();
         repository.Update(tblLOB);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #12
0
 public void UpdateAttribute(tbl_Attribute tblAttribute)
 {
     try
     {
         IGenericDataRepository <tbl_Attribute> repository = new GenericDataRepository <tbl_Attribute>();
         repository.Update(tblAttribute);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #13
0
 public void UpdateUserData(tbl_UserData tblUserData)
 {
     try
     {
         IGenericDataRepository <tbl_UserData> repository = new GenericDataRepository <tbl_UserData>();
         repository.Update(tblUserData);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #14
0
 public void UpdateFrequencyType(tbl_FrequencyType tblFrequencyTypes)
 {
     try
     {
         IGenericDataRepository <tbl_FrequencyType> repository = new GenericDataRepository <tbl_FrequencyType>();
         repository.Update(tblFrequencyTypes);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #15
0
 public void UpdateDA(tbl_DesignAccelerator tblDesignAccelerator)
 {
     try
     {
         IGenericDataRepository <tbl_DesignAccelerator> repository = new GenericDataRepository <tbl_DesignAccelerator>();
         repository.Update(tblDesignAccelerator);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #16
0
 public void UpdateAppVersion(tbl_AppVersion tblAppVersion)
 {
     try
     {
         IGenericDataRepository <tbl_AppVersion> repository = new GenericDataRepository <tbl_AppVersion>();
         repository.Update(tblAppVersion);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #17
0
        public void UpdateClient(tbl_Clients tblClient)
        {
            try
            {
                IGenericDataRepository <tbl_Clients> repository = new GenericDataRepository <tbl_Clients>();

                repository.Update(tblClient);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #18
0
        public ActionResult AddChoicesToQuestion(AddChoiceToQuestionViewModel vm)
        {
            var questionRepository = new GenericDataRepository <Question>();
            var question           = questionRepository.GetSingle(q => q.Id == vm.QuestionId, q => q.Choices);
            var choice             = new Choice()
            {
                Id = Guid.NewGuid().ToString(), ChoiceText = vm.ChoiceText, IsCorrect = vm.IsCorrect, Reason = vm.Reason
            };
            var choiceExists = new GenericDataRepository <Choice>().ChechIfExists(c => c.ChoiceText == vm.ChoiceText);

            question.Choices.Add(choice);
            questionRepository.Update(question);
            return(RedirectToAction(actionName: "ListChoicesForQuestion", routeValues: new { vm.QuestionId, vm.ExamId }));
        }
Exemple #19
0
        /// <summary>
        /// Validate and Update a record
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <typeparam name="M"></typeparam>
        /// <param name="dataRepository"></param>
        /// <param name="item"></param>
        public static void Update <T, M>(GenericDataRepository <T, M> dataRepository, object item)
            where T : class
            where M : class
        {
            //update with validation
            string[] errors         = new string[] { };
            string   exceptionTrace = "";

            if (!dataRepository.Update(ref errors, ref exceptionTrace, (T)item))
            {
                if (errors.Length > 0)
                {
                    throw new ArgumentException(String.Join("\r\n", errors));
                }
                else if (!String.IsNullOrEmpty(exceptionTrace))
                {
                    throw new DataException(exceptionTrace);
                }
                else
                {
                    throw new ArgumentException("Unknown error happened.\n");
                }
            }
        }
Exemple #20
0
 public bool Update(LOAISP ls)
 {
     return(dao.Update(ls));
 }
        public void UpdateChangePassword(tbl_ChangePassword tblChangePassword)
        {
            IGenericDataRepository <tbl_ChangePassword> repository = new GenericDataRepository <tbl_ChangePassword>();

            repository.Update(tblChangePassword);
        }
Exemple #22
0
 public bool Update(NHACC ncc)
 {
     return(dao.Update(ncc));
 }
Exemple #23
0
 public void Update(params T[] items)
 {
     _repository.Update(items);
 }