public bool AddMesgBendInfo(Tinfo model) { var result = false; const string AddMesgBendInfosql = @" INSERT INTO dbo.Tinfo ( InfoTital, InfoName,InfoBody,InfoSetTime) VALUES ( @InfoTital, @InfoName, @InfoBody, @InfoSetTime ) "; try { using (DbConnection conn = DbFactory.CreateConnection()) { result = conn.Execute(AddMesgBendInfosql, model) > 0; return(result); } } catch (System.Exception ex) { throw; } //SqlParameter[] para = new SqlParameter[] //{ // new SqlParameter("UserName",model.UserName), // new SqlParameter("PassWord", model.PassWord) // }; //sqlh.ExecData(adduserMSGSql, para); //base.Excute(); //return result; }
public bool AddMesgBendInfo(Tinfo model) { var NowTime = DateTime.Now; model.InfoSetTime = NowTime; return(bendinfoDal.AddMesgBendInfo(model)); }
public ActionResult EditorBendInfoMSG(Tinfo model) { var result = false; result = _bendinfoBll.UpdateMesgBendInfo(model); return(RedirectToAction("BendInfoIndex", "BendInfo")); }
public bool UpdateMesgBendInfo(Tinfo model) { const string update_MesgBendInfoSql = @" UPDATE dbo.Tinfo SET InfoTital=@InfoTital, InfoName=@InfoName, InfoBody=@InfoBody, InfoSetTime=@InfoSetTime WHERE ID=@ID" ; using (DbConnection conn = DbFactory.CreateConnection()) { var result = conn.Execute(update_MesgBendInfoSql, model) > 0; return(result); } }
public bool UpdateMesgBendInfo(Tinfo model) { return(bendinfoDal.UpdateMesgBendInfo(model)); }