/// <summary> /// 修改媒体合作 /// </summary> /// <param name="model"></param> /// <returns></returns> public int UpdMedium(JiaJiModels.medium model) { try { return(new JiaJiDAL.mediumdal().UpdMedium(model)); } catch (Exception ex) { return(0); } }
/// <summary> /// 修改媒体合作 /// </summary> /// <param name="model"></param> /// <returns></returns> public int UpdMedium(JiaJiModels.medium model) { try { string sql = "update medium set MediumName = '" + model.MediumName + "', MediumTitle = '" + model.MediumTitle + "', MediumImg = '" + model.MediumImg + "',MediumUrl='" + model.MediumUrl + "' WHERE MediumID =" + model.MediumID + " "; int h = MySqlDB.nonquery(sql, CommandType.Text, null); return(h); } catch (Exception ex) { return(0); } }
/// <summary> /// 添加媒体合作 /// </summary> /// <param name="model"></param> /// <returns></returns> public int mediumadd(JiaJiModels.medium model) { try { string sql = string.Format("insert into medium(MediumName,MediumTitle,MediumImg,`UpDate`,MediumUrl) Values('{0}','{1}','{2}','{3}','{4}')", model.MediumName, model.MediumTitle, model.MediumImg, model.UpDate, model.MediumUrl); int h = MySqlDB.nonquery(sql, CommandType.Text, null); return(h); } catch (Exception ex) { return(0); } }
/// <summary> /// 添加媒体合作 /// </summary> /// <param name="model"></param> /// <returns></returns> public int mediumadd(JiaJiModels.medium model) { return(new JiaJiDAL.mediumdal().mediumadd(model)); }