Esempio n. 1
0
        public bool InsertFiles(D_FTP_Entity dftpe)
        {
            string sp = "D_FTP_Insert";

            Dictionary <string, ValuePair> dic = new Dictionary <string, ValuePair>
            {
                { "@FTPType", new ValuePair {
                      value1 = SqlDbType.TinyInt, value2 = dftpe.FTPType
                  } },
                { "@VendorCD", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dftpe.VendorCD
                  } },
                { "@FTPFile", new ValuePair {
                      value1 = SqlDbType.VarChar, value2 = dftpe.FTPFile
                  } },
            };

            UseTransaction = true;
            return(InsertUpdateDeleteData(dic, sp));
        }
 public void ImportFile_FromFTP(DataRow[]  drKBN2)
 {
     foreach (DataRow row in drKBN2)
     {
         string[] files = GetFileList(row);
         if (files != null)
         {
             foreach (string file in files)
             {
                 bool flg = DownloadFiles(row, file);
                 if (flg)
                 {
                     dftpe = new D_FTP_Entity()
                     {
                         FTPType  = "2",
                         FTPFile  = file,
                         VendorCD = row["VendorCD"].ToString(),
                     };
                     bool result = ftpbl.InsertFiles(dftpe);
                 }
             }
         }
     }
 }
Esempio n. 3
0
 public void UploadFile_ToFTP(DataRow[] drKBN)
 {
     foreach (DataRow row in drKBN)
     {
         ArrayList FilePath = getFilePath(row["CreateServer"].ToString() + row["CreateFolder"].ToString() + @"\" + row["VendorCD"].ToString());
         if (FilePath != null)
         {
             foreach (string file in FilePath)
             {
                 bool flg = UploadFiles(row, file);
                 if (flg)
                 {
                     dftpe = new D_FTP_Entity()
                     {
                         FTPType  = "1",
                         FTPFile  = file.Split('\\').Last().ToString(),
                         VendorCD = row["VendorCD"].ToString(),
                     };
                     bool result = ftpbl.InsertFiles(dftpe);
                 }
             }
         }
     }
 }
Esempio n. 4
0
 public bool InsertFiles(D_FTP_Entity dftpe)
 {
     return(dftpdl.InsertFiles(dftpe));
 }