Пример #1
0
        public ActionResult SaveForm(string keyValue, string measuresJson, RiskEntity entity)
        {
            if (entity.RiskType == "设备")
            {
                entity.DangerSource = entity.FaultType;
            }
            int count = riskbll.SaveForm(keyValue, entity);

            //保存关联的管控措施
            if (count > 0 && measuresJson.Length > 0)
            {
                if (measuresBLL.Remove(entity.Id) >= 0)
                {
                    List <MeasuresEntity> list          = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MeasuresEntity> >(measuresJson);
                    HtStandardBLL         htstandardBLL = new HtStandardBLL();
                    foreach (MeasuresEntity measure in list)
                    {
                        if (measuresBLL.Save("", measure))
                        {
                            //HtStandardEntity htStandard = new HtStandardEntity();
                            //htStandard.DeptCode = entity.DeptCode;
                            //htStandard.Description = "【"+entity.AreaName+"】"+entity.Description;
                            //htStandard.Measures = measure.Content;
                            //htStandard.AreaId = entity.AreaId;
                            //htStandard.AreaName = entity.AreaName;
                            //htStandard.AreaCode = entity.AreaCode;
                            //htstandardBLL.SaveForm("", htStandard);
                        }
                    }
                }
            }
            return(Success("操作成功。"));
        }
Пример #2
0
        public ActionResult SaveForm(string keyValue, HtStandardItemEntity entity)
        {
            var st = new HtStandardBLL().GetEntity(entity.StId);

            entity.StCode = st.EnCode;
            htstandardbll.SaveForm(keyValue, entity);
            return(Success("操作成功。"));
        }