Example #1
0
        public ActionResult NewIndicatorCategoryLabel(IndicatorCategoryLabel item)
        {
            IndicatorService IService = new IndicatorService();

            IService.InsertIndicatorCategoryLabel(item);
            return(RedirectToAction("Edit", new { id = item.GrantTypeCodeID }));
        }
Example #2
0
        public ActionResult EditIndicatorCategoryLabel(int id, int grantid)
        {
            IndicatorService       ins = new IndicatorService();
            IndicatorCategoryLabel m   = ins.GetIndicatorCategoryLabel(id);

            ViewData["grantid"] = grantid;
            return(View(m));
        }
        public bool InsertIndicatorCategoryLabel(IndicatorCategoryLabel item)
        {
            bool result = true;

            try
            {
                db.IndicatorCategoryLabels.InsertOnSubmit(item);
                db.SubmitChanges();
            }
            catch (Exception ex)
            {
                Log.EnsureInitialized();
                Log.Error(typeof(IndicatorRepository), "----------------------------------------------", ex);
                // throw ex;
            }
            return(result);
        }
        public bool UpdateIndicatorCategoryLabel(IndicatorCategoryLabel item)
        {
            bool result = true;

            try
            {
                db.IndicatorCategoryLabels.Attach(item);
                db.Refresh(RefreshMode.KeepCurrentValues, item);
                db.SubmitChanges();
            }
            catch (Exception ex)
            {
                Log.EnsureInitialized();
                Log.Error(typeof(IndicatorRepository), "----------------------------------------------", ex);
                result = false;
                // throw ex;
            }
            return(result);
        }
 public bool InsertIndicatorCategoryLabel(IndicatorCategoryLabel item)
 {
     return(_rep.InsertIndicatorCategoryLabel(item));
 }
 public bool UpdateIndicatorCategoryLabel(IndicatorCategoryLabel item)
 {
     return(_rep.UpdateIndicatorCategoryLabel(item));
 }