/// <summary> /// 修改分公司信息 /// </summary> /// <returns></returns> public int UpdateFiliale(JiaJiModels.filialetext model) { try { return(new JiaJiDAL.FilialeDal().UpdateFiliale(model)); } catch (Exception ex) { return(0); } }
/// <summary> /// 添加分公司介绍 /// </summary> /// <param name="model"></param> /// <returns></returns> public int addFilialeText(JiaJiModels.filialetext model) { try { return(new JiaJiDAL.FilialeDal().addFilialeText(model)); } catch (Exception ex) { return(0); } }
/// <summary> /// 修改分公司介绍 /// </summary> /// <returns></returns> public int UpdateFilialeText(JiaJiModels.filialetext model) { try { string sql = "update study_abroad.filialetext set FilialeTexts='" + model.FilialeTexts + "',FilialetextAddr='" + model.FilialeTextAddr + "',FilialeTextPhone='" + model.FilialeTextPhone + "',FilialeID=" + model.FilialeId + ",FilialeImg='" + model.FilialeImg + "' where FilialeTextId=" + model.FilialeTextId + ""; int he = MySqlDB.nonquery(sql, CommandType.Text, null); return(he); } catch (Exception ex) { return(0); } }
/// <summary> /// 修改分公司信息 /// </summary> /// <returns></returns> public int UpdateFiliale(JiaJiModels.filialetext model) { try { string sql = "update study_abroad.filiale set FilialeName='" + model.FilialeName + "' where FilialeId=" + model.FilialeId + ""; int he = MySqlDB.nonquery(sql, CommandType.Text, null); return(he); } catch (Exception ex) { return(0); } }
/// <summary> /// 添加分公司信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public int addFiliale(JiaJiModels.filialetext model) { try { string sql = "INSERT INTO study_abroad.filiale (FilialeName) VALUES ('" + model.FilialeName + "')"; int he = MySqlDB.nonquery(sql, CommandType.Text, null); return(he); } catch (Exception ex) { return(0); } }
/// <summary> /// 添加分公司介绍 /// </summary> /// <param name="model"></param> /// <returns></returns> public int addFilialeText(JiaJiModels.filialetext model) { try { string sql = "insert into filialetext(FilialeTexts,FilialetextAddr,FilialeTextPhone,FilialeID,FilialeImg)VALUES('" + model.FilialeTexts + "','" + model.FilialeTextAddr + "','" + model.FilialeTextPhone + "'," + model.FilialeId + ",'" + model.FilialeImg + "')"; int he = MySqlDB.nonquery(sql, CommandType.Text, null); return(he); } catch (Exception ex) { return(0); } }
public JsonResult addFiliale(JiaJiModels.filialetext infor) { try { var i = new JiaJiBLL.FilialeBll().addFiliale(infor); if (i > 0) { return(Json(new { Success = true, Message = "添加成功" })); } else { return(Json(new { Success = false, Message = "添加失败" })); } } catch { return(Json(new { Success = false, Message = "添加失败" })); } }
public JsonResult editFilialeadd(JiaJiModels.filialetext model) { try { int id = model.FilialeTextId; var i = new JiaJiBLL.FilialeBll().UpdateFilialeText(model); if (i > 0) { return(Json(new { Success = true, Message = "修改成功" })); } else { return(Json(new { Success = false, Message = "修改失败" })); } } catch { return(Json(new { Success = false, Message = "修改失败" })); } }