/// <summary> /// 修改员工风采信息,返回1成功,其它失败 /// </summary> /// <param name="info">实体</param> /// <returns></returns> public int UpdateYuanGongFengCai(EyouSoft.Model.YlStructure.MWzYuanGongFengCaiInfo info) { if (info == null || string.IsNullOrEmpty(info.CompanyId) || string.IsNullOrEmpty(info.OperatorId) || string.IsNullOrEmpty(info.FengCaiId)) { return(0); } int dalRetCode = dal.UpdateYuanGongFengCai(info); return(dalRetCode); }
/// <summary> /// 新增员工风采信息,返回1成功,其它失败 /// </summary> /// <param name="info">实体</param> /// <returns></returns> public int InsertYuanGongFengCai(EyouSoft.Model.YlStructure.MWzYuanGongFengCaiInfo info) { if (info == null || string.IsNullOrEmpty(info.CompanyId) || string.IsNullOrEmpty(info.OperatorId)) { return(0); } info.FengCaiId = Guid.NewGuid().ToString(); info.IssueTime = DateTime.Now; int dalRetCode = dal.InsertYuanGongFengCai(info); return(dalRetCode); }
/// <summary> /// baocun /// </summary> void BaoCun() { var info = new EyouSoft.Model.YlStructure.MWzYuanGongFengCaiInfo(); info.CompanyId = CurrentUserCompanyID; info.Filepath = null; info.IssueTime = DateTime.Now; info.MingCheng = Utils.GetFormValue(txtMingCheng.UniqueID); info.OperatorId = SiteUserInfo.UserId; info.FengCaiId = FengCaiId; 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(FengCaiId)) { bllRetCode = new EyouSoft.BLL.YlStructure.BWz().InsertYuanGongFengCai(info); } else { bllRetCode = new EyouSoft.BLL.YlStructure.BWz().UpdateYuanGongFengCai(info); } if (bllRetCode == 1) { RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功")); } else { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败")); } }