Exemplo n.º 1
0
        private void _multiselect()
        {
            PathToInflowDocs.Clear();
            PathToInflowDocsNames.Clear();
            OpenFileDialog multidialog = new OpenFileDialog();

            multidialog.Multiselect = true;
            bool?result = multidialog.ShowDialog();

            string[] namesMassive = multidialog.SafeFileNames;
            string[] pathMassive  = multidialog.FileNames;

            for (int i = 0; i < pathMassive.Length; i++)
            {
                PathToInflowDocs.Add(pathMassive[i]);
                PathToInflowDocsNames.Add(namesMassive[i]);
            }

            if (pathMassive.Length > 0)
            {
                infloDoc   = "OK";
                DocNumbers = "Selected Documents " + pathMassive.Length.ToString();
                NotifyPropertyChanged("infloDoc");
                NotifyPropertyChanged("DocNumbers");
            }
        }
Exemplo n.º 2
0
        private void _Multisend()
        {
            if (Formaterrorflag != false)
            {
                return;
            }
            if (_Inumber <= 0)
            {
                return;
            }

            Random rand = new Random();

            order = Storage.datasetKlient.Tables["ClientInfo"].Rows[0][6].ToString();
            string adminID = Storage.datasetKlient.Tables["ClientInfo"].Rows[0][18].ToString();

            try
            {
                int index = userDAL.AddTask(order, adminID, 0, 0, 0, 0, _Inumber, _Onumber);
                for (int i = 0; i < PathToInflowDocs.Count; i++)
                {
                    string taskNameMain = "|" + order + "_" + "_inflow_user_task_№_" + index.ToString() + PathToInflowDocs[i].Remove(0, PathToInflowDocs[i].IndexOf('.'));
                    InterfaceService.FTPLoadToServer.FTPLoadFileOnly(FTPURL + taskNameMain, ftppass, ftpUser, PathToInflowDocs[i], taskNameMain);
                    userDAL.AddDocumentTask(index.ToString(), taskNameMain, FTPURL + taskNameMain);
                }
            }
            catch (Exception ex)
            {
                Logger.WriteLog(ex.Message, ex.Source);
            }
            finally
            {
                mainSelect      = "Not select";
                termSelect      = "Not select";
                PathToMain      = "";
                PathToTermSheet = "";
                Model.TasksModel.collectionsReset();
                _Bnumber = 0;
                _Snumber = 0;
                _Tnumber = 0;
                _Cnumber = 0;
                _Inumber = 0;
                _Onumber = 0;
                NotifyPropertyChanged("mainSelect");
                NotifyPropertyChanged("termSelect");
                NotifyPropertyChanged("Bnumber");
                NotifyPropertyChanged("Snumber");
                NotifyPropertyChanged("Tnumber");
                NotifyPropertyChanged("Cnumber");
                NotifyPropertyChanged("Inumber");
                NotifyPropertyChanged("Onumber");
                PathToInflowDocs.Clear();
            }
        }