//public void UpdateTagTemplate(Expression<Func<TBL_TAG_TEMP, bool>> where, Expression<Func<TBL_TAG_TEMP, TBL_TAG_TEMP>> updateValues)
        //{
        //    tagTemplateRepository.UpdateBulk(where, updateValues);
        //}

        public void DeleteTagTemplate(int tagTemplateId, string userId)
        {
            TBL_TAG_TEMP comp = tagTemplateRepository.GetById(tagTemplateId);

            comp.UPDATE_USER = userId;
            comp.IS_DELETED  = true;
            tagTemplateRepository.Update(comp);
        }
Exemple #2
0
 protected void UpdateTagTemplate(TBL_TAG_TEMP tagTemp, MVCxGridViewBatchUpdateValues <TBL_TAG_TEMP, int> updateValues)
 {
     try
     {
         if (!tagTemplateService.IsTagTemplateExist(tagTemp))
         {
             tagTemplateService.UpdateTagTemplate(tagTemp);
             tagTemplateService.SaveTagTemplate();
         }
         else
         {
             updateValues.SetErrorText(tagTemp, "Bu isimde şirket bulunmaktadır.");
         }
     }
     catch (Exception e)
     {
         updateValues.SetErrorText(tagTemp, e.Message);
     }
 }
Exemple #3
0
 protected void InsertTagTemplate(TBL_TAG_TEMP tagTemp, MVCxGridViewBatchUpdateValues <TBL_TAG_TEMP, int> updateValues)
 {
     try
     {
         if (!tagTemplateService.IsTagTemplateExist(tagTemp))
         {
             tagTemp.CREATED_DATE = DateTime.Now;
             tagTemp.UPDATE_USER  = User.Identity.GetUserId();
             tagTemplateService.CreateTagTemplate(tagTemp);
             tagTemplateService.SaveTagTemplate();
         }
         else
         {
             updateValues.SetErrorText(tagTemp, "Bu isimde şirket bulunmaktadır.");
         }
     }
     catch (Exception e)
     {
         updateValues.SetErrorText(tagTemp, e.Message);
     }
 }
 public void CreateTagTemplate(TBL_TAG_TEMP tagTemplate)
 {
     tagTemplateRepository.Add(tagTemplate);
 }
 public void UpdateTagTemplate(TBL_TAG_TEMP tagTemplate)
 {
     tagTemplateRepository.Update(tagTemplate);
 }
 public bool IsTagTemplateExist(TBL_TAG_TEMP tagTemplate)
 {
     return(tagTemplateRepository.Get(x => x.COMPANY_ID == tagTemplate.COMPANY_ID && x.IS_DELETED == false && x.ID != tagTemplate.ID && x.NAME.ToUpper() == tagTemplate.NAME.ToUpper()) == null ? false : true);
 }