public ActionResult SaveForm(string keyValue, DistrictEntity entity) { try { if (entity.LinkToCompany == null) { entity.LinkToCompany = ""; } if (entity.LinkToCompanyID == null) { entity.LinkToCompanyID = ""; } entity.DistrictName = entity.DistrictName.Replace("\\", "╲"); bis_districtbll.SaveForm(keyValue, entity); if (!string.IsNullOrEmpty(entity.LinkToCompanyID)) { dsBLL.Update(entity.DistrictID, entity.LinkToCompanyID.TrimEnd(','), entity.DistrictCode, entity.DistrictName, entity.ChargeDeptCode, OperatorProvider.Provider.Current()); } return(Success("操作成功。")); } catch (Exception ex) { return(Error(ex.ToString())); } }