private void UpLoadFileExecute() { FundsRegulatoryClient.SysConfigSrv.SysConfigInfo ftp = FinancialRegulation.Tools.HelpClass.Current.SYSCONFIG; if (ftp.FtpIP == null) { VMHelp.ShowMessage("ftp地址不能为空", false); return; } if (ftp.FtpPwd == null || ftp.FtpUser == null) { VMHelp.ShowMessage("ftp账号或密码不能为空", false); return; } if (FileName == null) { VMHelp.ShowMessage("账单未生成", false); return; } //OpenFileDialog op = new OpenFileDialog(); //op.Filter = "dat(*.sdat)|*.sdat"; //if (FilePath != null) //{ // op.InitialDirectory = FilePath; //} //if (op.ShowDialog() == DialogResult.OK) //{ // if (!op.FileName.Contains( FileName)) // { // if (VMHelp.AskMessage("上传文件与生产文件不一致,是否仍上传?")) // { // FileName = op.FileName; // } // else { return; } // } if (billclient.UpLoadFile(FileName, FilePath, ftp.FtpIP, ftp.FtpUser, ftp.FtpPwd)) { VMHelp.ShowMessage(true); } else { VMHelp.ShowMessage("对账文件上传失败,ftp地址、账号、密码错误", false); // FileName = null; } //} }
private void UpLoadFileExecute() { try { FundsRegulatoryClient.SysConfigSrv.SysConfigInfo ftp = FinancialRegulation.Tools.HelpClass.Current.SYSCONFIG; if (ftp.FtpIP == null) { VMHelp.ShowMessage("ftp地址不能为空", false); return; } if (ftp.FtpPwd == null || ftp.FtpUser == null) { VMHelp.ShowMessage("ftp账号或密码不能为空", false); return; } if (FileName == null) { VMHelp.ShowMessage("账单未生成", false); return; } //OpenFileDialog op = new OpenFileDialog(); //op.Filter = "dat(*.dat)|*.dat"; //if (FilePath != null) //{ // op.InitialDirectory = FilePath; //} //if (op.ShowDialog() == DialogResult.OK) //{ if (client.UpLoadFile(FileName, FilePath, ftp.FtpIP, ftp.FtpUser, ftp.FtpPwd)) { VMHelp.ShowMessage(true); } else { VMHelp.ShowMessage("对账文件上传失败,ftp地址、账号、密码错误", false); // FileName = null; } //} } catch (Exception e) { SendExcetpion(e); } }
/// <summary> /// 刷新系统配置对象 /// </summary> public void GETSYSTEMCONFIG() { _sysConfig = FundsRegulatoryClient.SysConfigClient.Instance.Selects()[0]; }