예제 #1
0
        public ActionResult storeSafetyLaw(string idsData, string ctype)
        {
            Operator user = ERCHTMS.Code.OperatorProvider.Provider.Current();

            if (!string.IsNullOrEmpty(idsData))
            {
                if (idsData.Contains(","))
                {
                    string[] array = idsData.TrimEnd(',').Split(',');
                    for (int i = 0; i < array.Length; i++)
                    {
                        int result = storelawbll.GetStoreBylawId(array[i].ToString());
                        if (result == 0)
                        {
                            StoreLawEntity entity = new StoreLawEntity();
                            entity.UserId    = user.UserId;
                            entity.LawId     = array[i].ToString();
                            entity.cType     = ctype;
                            entity.StoreTime = DateTime.Now;
                            storelawbll.SaveForm("", entity);
                        }
                    }
                }
                return(Success("收藏成功。"));
            }
            return(Error("无数据收藏。"));
        }
예제 #2
0
 /// <summary>
 /// 保存表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="entity">实体对象</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, StoreLawEntity entity)
 {
     try
     {
         service.SaveForm(keyValue, entity);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #3
0
 public ActionResult SaveForm(string keyValue, StoreLawEntity entity)
 {
     storelawbll.SaveForm(keyValue, entity);
     return(Success("操作成功。"));
 }