/// <summary> /// 修改公司荣誉信息,返回1成功,其它失败 /// </summary> /// <param name="info">实体</param> /// <returns></returns> public int UpdateGongSiRongYu(EyouSoft.Model.YlStructure.MWzGongSiRongYuInfo info) { if (info == null || string.IsNullOrEmpty(info.CompanyId) || string.IsNullOrEmpty(info.OperatorId) || string.IsNullOrEmpty(info.RongYuId)) { return(0); } info.IssueTime = DateTime.Now; int dalRetCode = dal.UpdateGongSiRongYu(info); return(dalRetCode); }
/// <summary> /// baocun /// </summary> void BaoCun() { var info = new EyouSoft.Model.YlStructure.MWzGongSiRongYuInfo(); info.CompanyId = CurrentUserCompanyID; info.Filepath = null; info.IssueTime = DateTime.Now; info.MingCheng = Utils.GetFormValue(txtMingCheng.UniqueID); info.OperatorId = SiteUserInfo.UserId; info.RongYuId = RongYuId; info.XiangXiJieShao = string.Empty; var items = upload1.Files; var items1 = upload1.YuanFiles; if (items != null && items.Count > 0) { info.Filepath = items[0].FilePath; } else if (items1 != null && items1.Count > 0) { info.Filepath = items1[0].FilePath; } int bllRetCode = 0; if (string.IsNullOrEmpty(RongYuId)) { bllRetCode = new EyouSoft.BLL.YlStructure.BWz().InsertGongSiRongYu(info); } else { bllRetCode = new EyouSoft.BLL.YlStructure.BWz().UpdateGongSiRongYu(info); } if (bllRetCode == 1) { RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功")); } else { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败")); } }