Exemple #1
0
 /// <summary>
 /// Saves the traninees information.
 /// </summary>
 /// <param name="license">The license.</param>
 /// <returns></returns>
 public static int SaveTranineesInfo(TrainLicense license)
 {
     if (license != null)
     {
         List <SQLiteParameter> cmdparams = new List <SQLiteParameter>
         {
             new SQLiteParameter("sfzmhm", license.PidNo),
             new SQLiteParameter("currenttime", DateTime.Now.ToLocalTime().ToString()),
             new SQLiteParameter("licenseinfo", JsonConvert.SerializeObject(license))
         };
         return(SqlLiteHelper.ExecuteNonQuery("insert into Traninees (sfzmhm,currenttime,licenseinfo) values (@sfzmhm,@currenttime,@licenseinfo)", cmdparams));
     }
     return(0);
 }
Exemple #2
0
 /// <summary>
 /// Saves the charges information.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <returns></returns>
 public static int SaveChargesInfo(ChargesInfo info)
 {
     if (info != null)
     {
         List <SQLiteParameter> cmdparams = new List <SQLiteParameter>
         {
             new SQLiteParameter("sfzmhm", info.PidNo),
             new SQLiteParameter("autoid", info.AutoId),
             new SQLiteParameter("starttime", info.StartTime),
             new SQLiteParameter("endtime", info.EndTime),
             new SQLiteParameter("mode", info.Mode),
             new SQLiteParameter("currentmileage", info.CurrentMileage),
             new SQLiteParameter("currentminutes", info.CurrentMinutes),
             new SQLiteParameter("surplustimes", info.SurplusTimes)
         };
         return(SqlLiteHelper.ExecuteNonQuery("insert into ChargeProcInfo (sfzmhm,autoid,starttime,endtime,mode,currentmileage,currentminutes,surplustimes) values (@sfzmhm,@autoid,@starttime,@endtime,@mode,@currentmileage,@currentminutes,@surplustimes)", cmdparams));
     }
     return(0);
 }