Exemple #1
0
        protected override void OnOpened()
        {
            FF.CCFormSoapClient da = Glo.GetCCFormSoapClientServiceInstance();
            da.RunSQLReturnTableAsync("SELECT Name,Designer,DesignerUnit,DesignerContext FROM Sys_MapData WHERE No='" + Glo.FK_MapData + "'");
            da.RunSQLReturnTableCompleted += new EventHandler <FF.RunSQLReturnTableCompletedEventArgs>(da_RunSQLReturnTableCompleted);

            da.FtpMethodAsync("GetDirs", "/Form.表单模版/", null, null);
            da.FtpMethodCompleted += new EventHandler <FF.FtpMethodCompletedEventArgs>(da_FtpMethodCompleted);
            base.OnOpened();
        }
        protected override void OnOpened()
        {
            this.canvas1.Children.Clear();
            this.OKButton.Visibility = System.Windows.Visibility.Collapsed;

            /*连接网络*/
            FF.CCFormSoapClient da = Glo.GetCCFormSoapClientServiceInstance();
            da.FtpMethodAsync("GetDirs", "/Form.表单模版/", null, null);
            da.FtpMethodCompleted += new EventHandler <FtpMethodCompletedEventArgs>(da_FtpMethodCompleted);

            this.loadingWindow.Title = "正在获取目录列表请稍候....";
            this.loadingWindow.Show();
            base.OnOpened();
        }
        void dir_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if ((DateTime.Now.Subtract(_lastTime).TotalMilliseconds) < 300)
            {
                Dir dir = sender as Dir;
                if (dir != null)
                {
                    FF.CCFormSoapClient da = Glo.GetCCFormSoapClientServiceInstance();
                    da.FtpMethodAsync("GetFls", this.PathOfFtp + "/" + dir.Tag.ToString(), null, null);
                    this.PathOfFtpCurrDir = dir.Tag.ToString();

                    da.FtpMethodCompleted   += new EventHandler <FtpMethodCompletedEventArgs>(da_Fls_FtpMethodCompleted);
                    this.loadingWindow.Title = "正在获取模板文件列表请稍候....";
                    this.loadingWindow.Show();
                }
            }
            _lastTime = DateTime.Now;
        }
Exemple #4
0
        void da_RunSQLsCompleted(object sender, FF.RunSQLsCompletedEventArgs e)
        {
            if (this.DDL_Sort.SelectedIndex < 0)
            {
                MessageBox.Show("请选择表单类型.");
                return;
            }

            FF.CCFormSoapClient daFtp = Glo.GetCCFormSoapClientServiceInstance();
            string isSec = "0";

            if (this.checkBox1.IsChecked == true)
            {
                isSec = "1";
            }

            ListBoxItem lbi = (ListBoxItem)this.DDL_Sort.SelectedItem;

            daFtp.FtpMethodAsync("ShareFrm", Glo.FK_MapData, isSec, lbi.Tag.ToString());
            daFtp.FtpMethodCompleted += new EventHandler <FF.FtpMethodCompletedEventArgs>(daFtp_FtpMethodCompleted);
        }
        void tempFile_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if ((DateTime.Now.Subtract(_lastTime).TotalMilliseconds) < 300)
            {
                TempleteFile fl = sender as TempleteFile;
                if (fl != null)
                {
                    if (MessageBox.Show("您确定要安装[" + fl.Tag.ToString() + "]模板吗?", "确认", MessageBoxButton.OKCancel)
                        != MessageBoxResult.OK)
                    {
                        return;
                    }

                    FF.CCFormSoapClient loadTemplete = Glo.GetCCFormSoapClientServiceInstance();
                    loadTemplete.FtpMethodAsync("LoadTempleteFile", fl.Tag.ToString(), Glo.FK_MapData, this.PathOfFtpCurrDir);
                    loadTemplete.FtpMethodCompleted += new EventHandler <FtpMethodCompletedEventArgs>(loadTemplete_FtpMethodCompleted);
                    this.loadingWindow.Title         = "正在装载模板请稍候。。。";
                    this.loadingWindow.Show();
                }
            }
            _lastTime = DateTime.Now;
        }