Ejemplo n.º 1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //判断当前路径文件是否存在
            _Files file = new _Files();

            //目录名称
            file.DirName = this.buttonEdit1.Text.Trim();
            //扩展名称
            file.FileName = this.textEdit1.Text.Trim();


            //全部当做SaveAs处理
            //保存前计算
            //this.CurrentBusiness.Calculate();



            if (this.PutType == "项目")
            {
                ImportForProject(file);
            }
            else
            {
                ImportForOther(file);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 项目导出(仅电子标书)
        /// </summary>
        private void ImportForProject(_Files p_file)
        {
            //当前目录
            string path = this.buttonEdit1.Text.Trim();

            //_Export e = new _Export(this.DataSource);

            /*switch (this.radioProject.SelectedIndex)
             * {
             *  case 0://导出项目文件 另存为项目
             *      Import(p_file);
             *      this.DialogResult = DialogResult.OK;
             *      break;
             *  case 1://TBS
             *      //e.ExportTBS(path);
             *      this.DataInterface.SaveXml(path, "TBS");
             *      this.DialogResult = DialogResult.OK;
             *      break;
             *  case 2://ZBS
             *      //e.ExportZBS(path);
             *      this.DataInterface.SaveXml(path, "ZBS");
             *      this.DialogResult = DialogResult.OK;
             *      break;
             *  case 3://BD
             *      //e.ExportBD(path);
             *      this.DataInterface.SaveXml(path, "BD");
             *      this.DialogResult = DialogResult.OK;
             *      break;
             *  default:
             *
             *      break;
             * }*/
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 通过xml创建项目
        /// </summary>
        /// <param name="p_files"></param>
        /// <returns></returns>
        private static CResult openProjectByxml(_Files p_files, ApplicationForm from)
        {
            CResult result = new CResult();
            //初始化一个新的项目业务
            _Business bus = APP.WorkFlows.Init(EWorkFlowType.PROJECT);
            //读取业务文件
            //CResult result = bus.LoadByXml(p_files);

            //准备工作
            XmlProjWorker projWorker = new XmlProjWorker(bus);

            projWorker.FileName = p_files.FullName;
            projWorker.form     = from;
            projWorker.Load();
            projWorker.Begin();

            /*_ImportXML xml = new _ImportXML(bus);
             * xml.RevertXmlObject += new RevertXmlObject(xml_RevertXmlObject);
             * xml.FileName = p_files.FullName;
             * BackgroundWorker XmlProjWorker = new BackgroundWorker();
             * XmlProjProgressAction form = new XmlProjProgressAction(XmlProjWorker);
             * XmlProjWorker.WorkerReportsProgress = true;
             * XmlProjWorker.DoWork += new DoWorkEventHandler(XmlProjWorker_DoWork);
             * XmlProjWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(XmlProjWorker_RunWorkerCompleted);
             *
             * XmlObject = new object[2] { XmlProjWorker ,1};
             * object param = new object[] { from, p_files, bus, xml, form };
             * XmlProjWorker.RunWorkerAsync(param);
             *
             * form.ShowDialog();*/
            return(result);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 单独打开一个文件
        /// </summary>
        private void OpenOneFile(string p_fileName)
        {
            //此处进行预打开对象操作
            _Files files = new _Files();

            //创建文件对象
            files.Init(p_fileName);
            if (files.Exists)
            {
                this.buttonEdit1.Text = files.FullName;
                //CResult result = APP.WorkFlows.Operaty.LoadOnlyObject(files);
                CResult result = CActionData.Load(files);
                if (result.Success)
                {
                    _COBJECTS obj = result.Value as _COBJECTS;
                    obj.Files = files;
                    m_ObjectList.Add(obj);
                    //初始化打开的文件对象
                    this.Init();
                }
                else
                {
                    //MessageBox.Show(result.ErrorInformation);
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 读取用户价格库数据
        /// </summary>
        /// <returns></returns>
        public ZiboSoft.Commons.Common.CResult Load()
        {
            _Files files = new _Files();

            files.ExtName  = _Files.用户价格库扩展名;
            files.DirName  = string.Format("{0}库文件\\系统库", this.m_PriceLibrary.Parent.Parent.Global.AppFolder.FullName);
            files.FileName = "用户价格库";
            CResult result = new CResult(false);

            try
            {
                FileInfo info = new FileInfo(files.FullName);
                if (info.Exists)
                {//文件存在的时候读取
                    m_PriceLibrary.UserPriceLibraryList = CFiles.Deserialize(files.FullName) as _UserPriceLibraryList;
                }
                result.Success = true;
                return(result);
            }
            catch (Exception ex)
            {
                result.Success          = false;
                result.ErrorInformation = ex.Message;
                return(result);
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 读取文件
 /// </summary>
 /// <returns></returns>
 public void Load()
 {
     try
     {
         string m_Path = string.Format("{0}库文件\\用户价格库\\{1}", APP.Application.Global.AppFolder.FullName, APP.GoldSoftClient.GlodSoftDiscern.CurrNo);
         ToolKit.GetDirectoryInfo(m_Path);
         _Files files = new _Files();
         files.ExtName  = _Files.用户价格库扩展名;
         files.DirName  = m_Path;
         files.FileName = APP.GoldSoftClient.GlodSoftDiscern.CurrNo;
         FileInfo info = new FileInfo(files.FullName);
         if (info.Exists)
         {
             //文件存在的时候读取
             _UserPriceLibrarySource cs = CFiles.Deserialize(files.FullName) as _UserPriceLibrarySource;
             if (cs != null)
             {
                 this.m_UserPriceLibrarySource = cs;
             }
         }
         else
         {
             this.m_UserPriceLibrarySource = new _UserPriceLibrarySource();
             CFiles.BinarySerialize(this.m_UserPriceLibrarySource, files.FullName);
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Ejemplo n.º 7
0
        public void Load()
        {
            _Files files = new _Files();

            files.ExtName  = _Files.用户规则库扩展名;
            files.DirName  = string.Format("{0}库文件\\系统库", this.Parent.Parent.Global.AppFolder.FullName);
            files.FileName = "用户规则库";
            CResult result = new CResult(false);

            try
            {
                FileInfo info = new FileInfo(files.FullName);
                if (info.Exists)
                {//文件存在的时候读取
                    this.m_DataSource = (CFiles.Deserialize(files.FullName) as _UserRules).m_DataSource;
                }

                result.Success = true;
            }
            catch (Exception ex)
            {
                result.Success          = false;
                result.ErrorInformation = ex.Message;
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 读取文件
 /// </summary>
 /// <returns></returns>
 public void Load()
 {
     try
     {
         string m_Path = string.Format("{0}库文件\\信息价格库\\", APP.Application.Global.AppFolder.FullName);
         ToolKit.GetDirectoryInfo(m_Path);
         _Files files = new _Files();
         files.ExtName  = _Files.信息价格库扩展名;
         files.DirName  = m_Path;
         files.FileName = "信息价格库";
         FileInfo info = new FileInfo(files.FullName);
         if (info.Exists)
         {
             //文件存在的时候读取
             _InformationPriceLibrarySource cs = CFiles.Deserialize(files.FullName) as _InformationPriceLibrarySource;
             if (cs != null)
             {
                 this.m_InformationPriceLibrarySource = cs;
             }
         }
         else
         {
             this.m_InformationPriceLibrarySource = new _InformationPriceLibrarySource();
             CFiles.BinarySerialize(this.m_InformationPriceLibrarySource, files.FullName);
         }
     }
     catch (Exception e)
     {
         throw e;
         return;
     }
 }
Ejemplo n.º 9
0
        /// <summary>
        ///  打开操作筛选
        /// </summary>
        private void Opear()
        {
            FileInfo file = new FileInfo(this.openFileDialog1.FileName);

            m_Files = new _Files();
            m_Files.Init(file.FullName);
            APP.FileType = m_Files.FileType;
            switch (m_Files.FileType)
            {
            case GOLDSOFT.QDJJ.COMMONS._Files.CFileType.单项工程:
            case GOLDSOFT.QDJJ.COMMONS._Files.CFileType.单位工程:
            case GOLDSOFT.QDJJ.COMMONS._Files.CFileType.项目文件:
                this.ctrlAttributes1.Visible = true;
                this.treeList1.Visible       = false;
                OpenObjects();
                break;

            case GOLDSOFT.QDJJ.COMMONS._Files.CFileType.电子标书:
                try
                {
                    //string filename = this.openFileDialog1.FileName.Replace(".JZBX", ".JXMX");
                    //update by fuqiang 2013.07.16
                    string filename = string.Format("{0}{1}", this.openFileDialog1.FileName.Substring(0, this.openFileDialog1.FileName.Length - 4), "JXMX");
                    File.Copy(this.openFileDialog1.FileName, filename, false);
                    this.openFileDialog1.FileName = filename;
                    this.ctrlAttributes1.Visible  = true;
                    this.treeList1.Visible        = false;
                    OpenObjects();
                }
                catch (Exception e)
                {
                    switch (e.GetType().Name)
                    {
                    case "IOException":
                        string filename = this.openFileDialog1.SafeFileName.Replace("JZBX", "JXMX");
                        MsgBox.Show(string.Format("[{0}]文件已存在,请检查后再次导入", filename), MessageBoxButtons.OK);
                        break;

                    default:
                        break;
                    }
                }
                break;

            case GOLDSOFT.QDJJ.COMMONS._Files.CFileType.XML文件:
                this.ctrlAttributes1.Visible = false;
                this.treeList1.Visible       = true;
                BindTree();
                break;

            case GOLDSOFT.QDJJ.COMMONS._Files.CFileType.工程信息文件:
                MsgBox.Show("该文件为工程信息文件,请在工程信息中打开", MessageBoxButtons.OK);
                break;

            default:    //不做任何操作
                MessageBox.Show(this, _Prompt.无法识别的打开文件, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
        }
Ejemplo n.º 10
0
        private bool Verification(_Files files)
        {
            FileInfo file = new FileInfo(files.FullName);

            if (file.Exists)
            {
                MessageBox.Show(this, _Prompt.文件已经存在, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }
            return(true);
        }
Ejemplo n.º 11
0
 /// <summary>
 ///  打开单项工程数据对象(此模块暂时取消)
 /// </summary>
 /// <param name="p_files"></param>
 /// <returns></returns>
 private static CResult openEngineering(_Files p_files)
 {
     /*APP.WorkFlows.Init(EWorkFlowType.Engineering);
      * CResult result = this.Load(p_files);
      * if (result.Success)
      * {
      *  result.Data = EBObjectType.Engineering;
      *  APP.WorkFlows.Container.Load(result.Value as CEngineering);
      * }
      * return result;*/
     return(null);
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 当前业务打开一个项目操作
 /// </summary>
 public override CResult Open(_Files p_Files)
 {
     //创建偶一个新的项目对象
     this.Current       = new _Projects();
     this.Current.Files = p_Files;
     //读取数据
     this.OpenDataBase();
     this.DataBase.Load(this.Current);
     //this.Current.InSerializable(p_Files);
     APP.Methods.Init(this.Current);
     return(null);
 }
Ejemplo n.º 13
0
        /// <summary>
        /// 单位工程排序对象
        /// </summary>
        void ProjWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            //仅读取数据
            this.m_Business.Create();
            this.CProjects.Name         = this.CProjects.NodeName = m_建设项目.项目名称;
            this.m_Business.Current.Key = this.m_Business.Current.ObjectKey;
            if (!string.IsNullOrEmpty(this.m_建设项目.招标信息表.计价依据))
            {
                this.CProjects.DEGZ = this.m_建设项目.招标信息表.计价依据.ToString();
                this.CProjects.QDGZ = "2009";
            }
            else
            {
                this.CProjects.DEGZ = "2009";
                this.CProjects.QDGZ = "2009";
            }
            _Files file = new _Files();

            file.ChangeExtName(this.FileName, _Files.ProjectExName);
            //创建一个新的对象
            this.m_Business.Current.Files = file;
            UnitCount = this.Count;

            (this.m_Business as _Pr_Business).CreateFile();
            (this.m_Business as _Pr_Business).BeginData();
            // 还原项目结构表(还原当前项目)
            this.m_Business.Current.StructSource.ModelProject.Add(this.m_Business.Current);

            //(this.m_Business as _Pr_Business).AddUnit(this.m_Business.Current);

            foreach (单项工程 item in m_建设项目.单项工程)
            {
                _Engineering Engineering = this.CProjects.Create() as _Engineering;
                //Engineering.Sort = ++this.CProjects.EnSort;
                Engineering.Name     = item.单项工程名称;
                Engineering.NodeName = item.单项工程名称;
                Engineering.Deep     = 1;
                SetEngineering(Engineering, item);
            }


            this.SetZTB();
            //this.m_Business.EndCreate();
            while (true)
            {
                if (Completed)
                {
                    Thread.Sleep(500);
                    break;
                }
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 打开单位工程的操作
        /// </summary>
        /// <param name="p_files"></param>
        /// <returns></returns>
        private static void openUnitProject(_Files p_files, ApplicationForm from)
        {
            _Business        bus        = APP.WorkFlows.Init(EWorkFlowType.UnitProject);
            object           param      = new object[] { from, p_files, bus };
            BackgroundWorker UnitWorker = new BackgroundWorker();

            UnitWorker.WorkerReportsProgress = true;
            UnitWorker.DoWork             += new DoWorkEventHandler(UnitWorker_DoWork);
            UnitWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(UnitWorker_RunWorkerCompleted);
            UnitWorker.RunWorkerAsync(param);
            ProgressFrom form = new ProgressFrom(UnitWorker);

            form.ShowDialog();
        }
Ejemplo n.º 15
0
        static void XmlProjWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker XmlProjWorker = sender as BackgroundWorker;

            object[]              param = e.Argument as object[];
            ApplicationForm       form  = param[0] as ApplicationForm;
            _Files                file  = param[1] as _Files;
            _Business             bus   = param[2] as _Business;
            _ImportXML            xml   = param[3] as _ImportXML;
            XmlProjProgressAction pf    = param[4] as XmlProjProgressAction;

            xml.Load();
            object p = new object[] { true, xml.Count };

            XmlProjWorker.ReportProgress(0, p);
            bus.Current = xml.Import();
            e.Result    = new object[] { form, file, bus };
        }
Ejemplo n.º 16
0
 /// <summary>
 /// 保存文件
 /// </summary>
 /// <returns></returns>
 public void Save()
 {
     try
     {
         string m_Path = string.Format("{0}库文件\\信息价格库\\", APP.Application.Global.AppFolder.FullName);
         ToolKit.GetDirectoryInfo(m_Path);
         _Files files = new _Files();
         files.ExtName  = _Files.信息价格库扩展名;
         files.DirName  = m_Path;
         files.FileName = "信息价格库";
         CFiles.BinarySerialize(this.m_InformationPriceLibrarySource, files.FullName);
         return;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Ejemplo n.º 17
0
        private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DialogResult result = this.openFileDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                //此处判断打开文件的类型然后继续操作
                this.buttonEdit1.Text = this.openFileDialog1.FileName;

                FileInfo file = new FileInfo(this.openFileDialog1.FileName);
                m_Files = new _Files();
                m_Files.Init(file.FullName);
                APP.FileType = m_Files.FileType;
                //选择操作
                //this.Opear();
                ////BindTree();
            }
        }
Ejemplo n.º 18
0
 /// <summary>
 /// 保存文件
 /// </summary>
 /// <returns></returns>
 public void Save()
 {
     try
     {
         string m_Path = string.Format("{0}库文件\\用户价格库\\{1}", APP.Application.Global.AppFolder.FullName, APP.GoldSoftClient.GlodSoftDiscern.CurrNo);
         ToolKit.GetDirectoryInfo(m_Path);
         _Files files = new _Files();
         files.ExtName  = _Files.用户价格库扩展名;
         files.DirName  = m_Path;
         files.FileName = APP.GoldSoftClient.GlodSoftDiscern.CurrNo;
         CFiles.BinarySerialize(this.m_UserPriceLibrarySource, files.FullName);
         return;
     }
     catch (Exception)
     {
         return;
     }
 }
Ejemplo n.º 19
0
        /// <summary>
        /// 打开项目的过程
        /// </summary>
        private static void openProject(_Files p_files, ApplicationForm from)
        {
            //初始化一个新的项目业务
            _Business bus = APP.WorkFlows.Init(EWorkFlowType.PROJECT);
            //打开一个业务文件
            //bus.Open(p_files);
            //打开业务操作窗体
            //from.ActionFace.OpenNewBussinessForm(bus);

            object           param      = new object[] { from, p_files, bus };
            BackgroundWorker ProjWorker = new BackgroundWorker();

            ProjWorker.WorkerReportsProgress = true;
            ProjWorker.DoWork             += new DoWorkEventHandler(ProjWorker_DoWork);
            ProjWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(ProjWorker_RunWorkerCompleted);
            ProjWorker.RunWorkerAsync(param);
            ProgressFrom form = new ProgressFrom(ProjWorker);

            form.ShowDialog();
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 提交当前页面数据
        /// </summary>
        public void Commit()
        {
            //设置工作目录
            _Files files = new _Files();

            APP.Application.Global.WorkFolder = new System.IO.DirectoryInfo(this.comboBoxEdit1.Text.Trim());

            /*switch (APP.BObjects.BObjectType)
             * {
             *  case EBObjectType.PROJECT://创建项目的时候调用
             *              //APP.General.CurrentProjectsFiles.DirectoryName = this.textEdit2.Text.Trim();
             *              //APP.General.CurrentProjectsFiles.WorkFolder = APP.Application.Global.WorkFolder;
             *          files.ExtName  = _Files.ProjectExName;
             *          files.DirName  = this.comboBoxEdit1.Text.Trim();
             *          files.FileName = textEdit2.Text.Trim();
             *          //设置文件属性
             *          APP.General.CurrentProject.Files = files;
             *       break;
             * }*/
        }
Ejemplo n.º 21
0
        public void Save()
        {
            _Files files = new _Files();

            files.ExtName  = _Files.用户规则库扩展名;
            files.DirName  = string.Format("{0}库文件\\系统库", this.Parent.Parent.Global.AppFolder.FullName);
            files.FileName = "用户规则库";
            CResult result = new CResult(false);

            try
            {
                CFiles.BinarySerialize(this, files.FullName);
                result.Success = true;
            }
            catch (Exception ex)
            {
                result.Success          = false;
                result.ErrorInformation = ex.Message;
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 从文件加载到当前项目中
        /// </summary>
        /// <param name="p_files">要加载的文件对象</param>
        public override CResult Load(_Files p_files)
        {
            CResult result = new CResult(false);

            try
            {
                _UnitProject cu = CFiles.BinaryDeserialize(p_files.FullName) as _UnitProject;
                this.Current = cu;
                cu.Files     = p_files;
                //初始化数据对象
                this.InitDataObject(this.Current);
                result.Success = true;
                return(result);
            }
            catch
            {
                result.Success          = false;
                result.ErrorInformation = _Prompt.打开文件出错;
                return(result);
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 其他对象导出
        /// </summary>
        private void ImportForOther(_Files info)
        {
            switch (this.radioOther.SelectedIndex)
            {
            case 0:    //导出单位工程/单项工程 文件
                Import(info);
                break;

            case 1:

                break;

            case 2:

                break;

            default:

                break;
            }
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 单位工程处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void UnitWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                BackgroundWorker ProjWorker = sender as BackgroundWorker;
                object[]         param      = e.Argument as object[];
                ApplicationForm  form       = param[0] as ApplicationForm;
                _Files           file       = param[1] as _Files;
                _Business        bus        = param[2] as _Business;

                using (FileStream stream = new FileStream(file.FullName, FileMode.Open, FileAccess.Read))
                {
                    //stream.Position = 0;
                    GZipStream zip = new GZipStream(stream, CompressionMode.Decompress, true);
                    {
                        //zip.Seek(0, SeekOrigin.Begin);
                        BinaryFormatter formater = new BinaryFormatter();
                        _FileHeader     header   = (_FileHeader)formater.Deserialize(zip);
                        _StructSource   ds       = (_StructSource)formater.Deserialize(zip);
                        //创建新的单位工程(单位工程业务体)
                        _UnitProject unit = new _UnitProject();
                        unit.Files = file;
                        unit.Ready(ds);
                        //初始化新的临时对象(不参与序列化此对象每次使用需要呗初始化)

                        /*obj.Property.Temporary = new _Temporary();
                         * //默认同步临时库对象
                         * obj.Property.Temporary.Libraries = obj.Property.DLibraries.Copy();
                         * obj.Property.Temporary.Libraries.Init(APP.Application);
                         * obj.Application = APP.Application;*/
                        e.Result = new object[] { form, unit, bus };
                    }
                    zip.Close();
                }
            }
            catch (Exception)
            {
                MsgBox.Show(_Prompt.无法识别的打开文件, MessageBoxButtons.OK);
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 保存当前的数据
        /// </summary>
        /// <returns></returns>
        public CResult Save()
        {
            _Files files = new _Files();

            files.ExtName  = _Files.用户价格库扩展名;
            files.DirName  = string.Format("{0}库文件\\系统库", this.m_PriceLibrary.Parent.Parent.Global.AppFolder.FullName);
            files.FileName = "用户价格库";
            CResult result = new CResult(false);

            try
            {
                CFiles.BinarySerialize(m_PriceLibrary.UserPriceLibraryList, files.FullName);
                result.Success = true;
                return(result);
            }
            catch (Exception ex)
            {
                result.Success          = false;
                result.ErrorInformation = ex.Message;
                return(result);
            }
        }
Ejemplo n.º 26
0
        static void XmlProjWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            object[]        result   = e.Result as object[];
            ApplicationForm form     = result[0] as ApplicationForm;
            _Files          file     = result[1] as _Files;
            _Business       bus      = result[2] as _Business;
            FileInfo        FileName = new FileInfo(file.FileName);
            //处理文件名
            string NewExists  = _Files.ProjectExName;
            string p_filename = FileName.FullName.Replace(FileName.Extension, NewExists);

            file.init(p_filename);
            bus.Current.Files = file;
            //效验函数
            if (form.Validation(bus))
            {
                //this.DialogResult = DialogResult.Cancel;
                //开启业务窗体
                GC.Collect();
                form.ActionFace.OpenNewBussinessForm(bus);
            }
        }
Ejemplo n.º 27
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            string yp = this.CurrentBusiness.Current.PassWord;

            if (OutType == "JZBX")
            {
                CPwdForm form = new CPwdForm();
                form.CurrentBusiness = this.CurrentBusiness;
                form.Source          = this.CurrentBusiness.Current;
                form.isJZBX          = true;
                DialogResult result = form.ShowDialog();

                if (result == DialogResult.OK)
                {
                    //全部当做SaveAs处理

                    _Files file = new _Files();
                    //目录名称
                    file.DirName  = this.buttonEdit1.Text.Trim();
                    file.ExtName  = _Files.Proj_DZBS;
                    file.FileName = this.textEdit1.Text.Trim();

                    if (this.DataSource.ObjectType == EObjectType.PROJECT)
                    {
                        //开始到处逻辑业务
                        FileInfo info = new FileInfo(file.FullName);

                        this.DataInterface.SaveAsDZBS(info);
                        if (OutType == "JZBX")
                        {
                            this.CurrentBusiness.Current.PassWord = yp;
                        }
                        //(this.CurrentBusiness as _Pr_Business).SaveAsDZBS(info);
                    }
                }
            }
            this.DialogResult = DialogResult.OK;
        }
Ejemplo n.º 28
0
 /// <summary>
 /// 打开一个业务文件到
 /// </summary>
 /// <returns></returns>
 public virtual CResult Open(_Files p_files)
 {
     return(null);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// 提供通过文件加载项目到当前业务的方法
 /// </summary>
 /// <param name="p_files">文件对象</param>
 public virtual CResult Load(_Files p_files)
 {
     return(null);
 }
Ejemplo n.º 30
0
        public override CResult SaveAs(_Files p_Files)
        {
            FileInfo info = new FileInfo(p_Files.FullName);

            return(this.SaveAs(info));
        }