public bool UpdateTemplate(PaperSubPage paperSubPage) { StringBuilder sbAddUser = new StringBuilder(); sbAddUser = sbAddUser.Append("update subpageone set "); if (!string.IsNullOrEmpty(paperSubPage.payguide)) { sbAddUser = sbAddUser.Append("payguide='" + paperSubPage.payguide + "'"); } if (!string.IsNullOrEmpty(paperSubPage.creditguarantee)) { sbAddUser = sbAddUser.Append("creditguarantee='" + paperSubPage.creditguarantee + "'"); } if (!string.IsNullOrEmpty(paperSubPage.aboutus)) { sbAddUser = sbAddUser.Append("aboutus='" + paperSubPage.aboutus + "'"); } sbAddUser = sbAddUser.Append(" where id =" + paperSubPage.id); int iResult = DBHelper.ExcuteNoQuerySql(sbAddUser.ToString()); if (iResult == 1) { return(true); } else { return(false); } }
public ActionResult SaveThree(PaperSubPage param) { SubPageBLL subPageBLL = new SubPageBLL(); bool b = subPageBLL.SaveTemplate(param); return(RedirectToAction("ThreePage")); }
public bool SaveTemplate(PaperSubPage paperSubPage) { bool b = false; SubPageDAL subPageDAL = new SubPageDAL(); if (paperSubPage.id > 0) { b = subPageDAL.UpdateTemplate(paperSubPage); } return(b); }