コード例 #1
0
ファイル: Form1.cs プロジェクト: rand4505/WinElan2Lims
 private static string LC_SampleDateTimeLookup( Sample Item)
 {
     ModeLabel.Text = "Looking up LabCal sample times.";
     Database myDB = new Database();
     SimplerAES myAES = new SimplerAES();
     string BaseCommand = "+CFENk6LKiNLKVKt+NZnQO1d4fqE6vLg1eHJuaCfBFjYxBPPH8K2Y4x6hwMOrzzN78bgkB0bfqdojXMvuzYoZA==";
     Item.SampleNameBackup = Item.SampleNameBackup.TrimStart("\"".ToArray());
     Item.SampleNameBackup = Item.SampleNameBackup.TrimEnd("\"".ToArray());
     myDB.CurrentCommand.SetCommand("GetLC_SampleDateTime");
     ArrayList Retrieved = myDB.RetrieveData(myAES.Decrypt(BaseCommand) + quoet + Item.SampleNameBackup + quoet, ref RTB, ref ErrorLog);
     if (Retrieved.Count != 0){
         DateTime Referance = (DateTime)Retrieved[0];
         Item.DateTimeInSQL = BuildDateTimeStamps(Referance.ToString());
         return Referance.ToString();
     }
     else return "";
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: rand4505/WinElan2Lims
 private static ArrayList LoadVardesc( Database LinktoDB)
 {
     ArrayList Pulldown = new ArrayList();
     ModeLabel.Text = "Loading Varible Descriptions.";
     string Command = "twOrmPTXIpHyfSw0F2nU8MD+p/8hyw3sfcVCvlWG4Aa1X9bw+9Csi5QKVaNIIxsqKaFc+PhHqThWwpEHM1fevg==";
     LinktoDB.CurrentCommand.SetCommand("GetVarDesc");
     Pulldown = LinktoDB.RetrieveData(Command, ref RTB, ref ErrorLog);
     return Pulldown;
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: rand4505/WinElan2Lims
 private bool UploadToDo( string myFile)
 {
     RTB.Clear();
     if (CurrentMode == RUNMODE.UPLOAD) {
         this.Refresh();
         Samples = new ArrayList();
         Database LinktoDB = new Database();                      this.Refresh();
         LC_SAMPLE = LoadLCSample(LinktoDB);                      this.Refresh();
         VARDESC = LoadVardesc(LinktoDB);                         this.Refresh();
         LinktoDB = null;
         ParseElanFile(myFile, FileData, Samples);                this.Refresh();
         AssignDayMonthFromLabID(Samples);                        this.Refresh();
         IsSampleQC(Samples);                                     this.Refresh();
         CheckForQCI(Samples);                                    this.Refresh();
         LC_SampleDateTimeLookup(Samples);                        this.Refresh();
         CheckForReRun(Samples);                                  this.Refresh();
         AssignQCSets(Samples);                                   this.Refresh();
         Add_ABC_ToQCs(Samples);                                  this.Refresh();
         GetSampleNotesFromDBAndAssign(Samples, LC_SAMPLE);       this.Refresh();
         AddSmpXToList(Samples);                                  this.Refresh();
         BuildDateTimeStamps(Samples);                            this.Refresh();
         AddQCSetToList(Samples);                                 this.Refresh();
         PruneNonUploadSamples(Samples);                          this.Refresh();
         ToSendOrNot(Samples, VARDESC);                           this.Refresh();
         if (Display(Samples)){
             ModeLabel.Text = "Uploading!";
             this.Refresh();
             LinktoDB = new Database();
             LinktoDB.CurrentCommand.SetCommand("UPLOAD");
             LinktoDB.SendData(Samples, Samples.Count, LinktoDB.CurrentCommand, RTB, ref ErrorLog);
             LinktoDB = null;
             ModeLabel.Text = "Done!";
             if (ErrorLog.Length > 0) WriteErrorLog(ErrorLog);
             MoveFileToUploaded(myFile);
             GC.Collect();
             GC.WaitForPendingFinalizers();
             GC.WaitForPendingFinalizers();
         }
         Samples.Clear();
         LC_SAMPLE.Clear();
         VARDESC.Clear();
         return true;
     }
     else
     {
         Samples.Clear();
         LC_SAMPLE.Clear();
         VARDESC.Clear();
         return false;
     }
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: rand4505/WinElan2Lims
 private static ArrayList LoadLCSample( Database LinktoDB)
 {
     ArrayList Pulldown = new ArrayList();
     ModeLabel.Text = "Loading LabCal Samples";
     SimplerAES myAES = new SimplerAES();
     string Command = "u+BNjH3jaVOculsEnqUwP+r90S6WjZnxTqEQvuCyWyJ1mbGvsv9gMGoj3pj9QlMq";
     LinktoDB.CurrentCommand.SetCommand("GetLC_Samples");
     Pulldown = LinktoDB.RetrieveData(Command, ref RTB, ref ErrorLog);
     return Pulldown;
 }