public string addReturnID(Model.system addsystem) { try { string sql = string.Format ( "INSERT INTO system(systemName,systemDM,comment,guid) VALUES('{0}','{1}','{2}','{3}') ;select last_insert_rowid()", addsystem.systemName, addsystem.systemDM, addsystem.comment, addsystem.guid ); var ds = SqliteHelper.ExecuteScalar(con, sql, CommandType.Text); return(ds.ToString()); } catch { return("-1"); } }
public bool add(Model.system addsystem) { try { string sql = string.Format ( "INSERT INTO system (systemName,systemDM,comment,guid) VALUES('{0}','{1}','{2}','{3}') ;select last_insert_rowid()", addsystem.systemName, addsystem.systemDM, addsystem.comment, addsystem.guid ); var ds = SqliteHelper.ExecuteScalar(con, sql, CommandType.Text); if (Convert.ToInt32(ds) > 0) { return(true); } return(false); } catch { return(false); } }
public bool updata(Model.system updatasystem) { throw new NotImplementedException(); }
public bool add(Model.system addsystem) { return(ServerHelp.addSingleInfoNotReturnID <system>(addsystem, _webip)); }