Ejemplo n.º 1
0
 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"); }
 }
Ejemplo n.º 2
0
 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); }
 }
Ejemplo n.º 3
0
 public bool updata(Model.system updatasystem)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public bool add(Model.system addsystem)
 {
     return(ServerHelp.addSingleInfoNotReturnID <system>(addsystem, _webip));
 }