Пример #1
0
 public InsertYTLBSummaryForm(_Business p_Business, _UnitProject p_Activitie)
 {
     this.CurrentBusiness  = p_Business;
     this.Activitie        = p_Activitie;
     m_Methods_YTLBSummary = new _Methods_YTLBSummary(p_Activitie);
     InitializeComponent();
 }
Пример #2
0
        /// <summary>
        ///公开的为单位对象使用前调用的初始化对象(此前所有初始化数据对象的地方统一在此处调用)
        /// </summary>
        /// <param name="p_obj">业务对象</param>
        public void Init(_UnitProject p_Info)
        {
            //p_Info.Application = APP.Application;
            //if (p_Info.Property == null) p_Info.Property = new _Un_Property(p_Info);
            //初始化库信息
            //p_Info.Property.DLibraries.Init(APP.Application);

            #region --------------不参与序列化的操作--------------------
            //初始化新的临时对象(不参与序列化此对象每次使用需要呗初始化)
            p_Info.Property.Temporary = new _Temporary();
            //默认同步临时库对象
            p_Info.Property.Temporary.Libraries = p_Info.Property.DLibraries.Copy();
            p_Info.Property.Temporary.Libraries.Init(APP.Application);
            #endregion
            //初始化参数信息
            //p_Info.Property.ParameterSettings.Create();
            //初始化措施项目
            //p_Info.Property.MeasuresProject.Load();
            //初始化子目增加费
            //p_Info.Property.IncreaseCosts.init();
            //初始化其他项目
            //p_Info.Property.OtherProject.init();
            //初始化汇总分析
            //p_Info.Property.Metaanalysis.Init();
            //工程信息
            //p_Info.Property.UnInformation.Init();
            //初始化报表对象
            //p_Info.Property.Report.LoadReport(APP.Cache.BaseReport);
        }
Пример #3
0
        /// <summary>
        /// 单元格编辑事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void treeList1_CellValueChanged(object sender, DevExpress.XtraTreeList.CellValueChangedEventArgs e)
        {
            DataRowView info = this.projectTrees1.treeList1.GetDataRecordByNode(e.Node) as DataRowView;

            if (info != null)
            {
                info["Name"]     = e.Value.ToString();
                info["NodeName"] = e.Value.ToString();
                //info.StructSource.ModelProject.UpDate(info);
                //this.CurrentBusiness.Current.StructSource.ModelProject.UpDate(info);
                _UnitProject unit = info["UnitProject"] as _UnitProject;
                if (unit != null)
                {
                    unit.Name           = unit.NodeName = e.Value.ToString();
                    info["UnitProject"] = unit;
                }
            }


            ///如果是已经存在的数据

            /*if (this.projectTrees1.SelectItem.ObjectState == EObjectState.UnChange)
             * {
             *  //当前对象设置为修改状态
             *  this.projectTrees1.SelectItem.ObjectState = EObjectState.Modify;
             * }
             * this.projectTrees1.SelectItem.Property.Name = e.Value.ToString();*/
        }
Пример #4
0
        public static _Methods CreateIntaceMet(_Business m_Currentbus, _UnitProject p_un, _Entity_SubInfo info)
        {
            _Methods m = new _Methods(m_Currentbus, p_un, info);

            if (info.PID == 0)
            {
                m = new _Mothod_Measures(m_Currentbus, p_un, info);
                return(m);
            }
            if (string.IsNullOrEmpty(info.LB) && info.PID != 0)
            {
                m = new _Motheds_CommonProj(m_Currentbus, p_un, info);
                return(m);
            }

            if (info.LB.Equals("清单"))
            {
                m = new _Mothods_MFixed(m_Currentbus, p_un, info);
                return(m);
            }
            if (info.LB.Contains("子目"))
            {
                m = new _Mothods_MSubheadings(m_Currentbus, p_un, info);
                return(m);
            }
            return(m);
        }
Пример #5
0
 //GLODSOFT.QDJJ.BUSINESS._OtherProject_Statistics Statistics = new GLODSOFT.QDJJ.BUSINESS._OtherProject_Statistics(null);
 public OtherProjectForm(_UnitProject active)
 {
     this.Activitie        = active;
     this.ProjectStaistics = new GLODSOFT.QDJJ.BUSINESS._Project_Statistics(active, this.CurrentBusiness);
     //this.Statistics.Unit = active;
     InitializeComponent();
 }
Пример #6
0
 public BaseUI(_UnitProject p_CUnitProject)
 {
     this.Activitie = p_CUnitProject;
     InitializeComponent();
     APP.UnInformation.OnCheck -= new _UnInformation.CheckHandler(UnInformation_OnCheck);
     APP.UnInformation.OnCheck += new _UnInformation.CheckHandler(UnInformation_OnCheck);
 }
Пример #7
0
        public static _Methods CreateIntace(_Business m_Currentbus, _UnitProject p_un, _Entity_SubInfo info)
        {
            _Methods m = new _Methods(m_Currentbus, p_un, info);

            switch (info.LB)
            {
            case "分部-专业":
                m = new _Methods_Pro(m_Currentbus, p_un, info);
                break;

            case "分部-章":
                m = new _Method_Chapt(m_Currentbus, p_un, info);
                break;

            case "分部-节":
                m = new _Method_Fest(m_Currentbus, p_un, info);
                break;

            case "清单":
                m = new _Methods_Fixed(m_Currentbus, p_un, info);
                break;

            case "子目":
                m = new _Methods_Subheadings(m_Currentbus, p_un, info);
                break;

            default:
                break;
            }
            return(m);
        }
Пример #8
0
        private void SetUnitProject(object o)
        {
            SetInfo      info        = (SetInfo)o;
            _Engineering Engineering = info.Engineering;
            _UnitProject UnitProject = info.UnitProject;
            单位工程         dx          = info.dw;

            SetOtherProject(UnitProject.Property.OtherProject, dx.其他项目表, dx);

            _Common.Activitie = UnitProject;//给当前的单位工程赋值



            #region 分部分项对象以及赋值
            //UnitProject.Property.SubSegments = new _SubSegments(UnitProject);//分部分项对象
            SetSubSegments(UnitProject.Property.SubSegments, dx.分部分项表, UnitProject, dx);
            #endregion


            #region 措施项目对象以及赋值
            //UnitProject.Property.MeasuresProject = new _MeasuresProject(UnitProject);//措施项目对象
            //UnitProject.Property.MeasuresProject.IsInit = false;
            SetMeasuresProject(UnitProject.Property.MeasuresProject, dx.措施项目表, UnitProject, dx);
            #endregion

            //UnitProject.Property.Metaanalysis = new _Metaanalysis(UnitProject);//单位工程汇总对象
            //UnitProject.Property.Metaanalysis.IsInit = false;
            SetMetaanalysis(UnitProject.Property.Metaanalysis, dx);


            // UnitProject.Property.QuantityUnitSummaryList = new _QuantityUnitSummaryList(UnitProject);
        }
Пример #9
0
        /// <summary>
        /// 初始化单位工程
        /// </summary>
        /// <param name="p_info"></param>
        public override void InitDataObject(GOLDSOFT.QDJJ.COMMONS._COBJECTS p_Info)
        {
            //初始化属性
            p_Info.Property.DLibraries.FixedLibrary.Rule    = p_Info.DEGZ;
            p_Info.Property.DLibraries.FixedLibrary.LibName = p_Info.DELibName;
            p_Info.Property.DLibraries.AtlasGallery.LibName = p_Info.TJLibName;
            p_Info.Property.DLibraries.ListGallery.Rule     = p_Info.QDGZ;
            p_Info.Property.DLibraries.ListGallery.LibName  = p_Info.QDLibName;
            //_Library
            //初始化库
            p_Info.Property.DLibraries.Init(APP.Application);
            //初始化新的临时对象(不参与序列化此对象每次使用需要呗初始化)
            p_Info.Property.Temporary = new _Temporary();
            //默认同步临时库对象
            p_Info.Property.Temporary.Libraries = p_Info.Property.DLibraries.Copy();
            p_Info.Property.Temporary.Libraries.Init(APP.Application);
            p_Info.Property.IncreaseCosts.init();//初始化子目取费
            _UnitProject m_UnitProject = p_Info as _UnitProject;

            if (m_UnitProject != null)
            {
                if (m_UnitProject.StructSource.ModelUnitFee.Rows.Count == 0 || m_UnitProject.StructSource.ModelPSubheadingsFee.Rows.Count == 0)
                {
                    _Methods_ParamsSeting m_Methods_ParamsSeting = new _Methods_ParamsSeting(m_UnitProject);
                    m_Methods_ParamsSeting.Init();
                    DataRow[] m_MRGCQF = m_UnitProject.StructSource.ModelUnitFee.Select(string.Format("GCLB='{0}'", m_UnitProject.ProType));
                    if (m_MRGCQF.Length == 0)
                    {
                        m_UnitProject.ProType = m_UnitProject.StructSource.ModelUnitFee.Rows[0]["GCLB"].ToString();
                    }
                }
            }
        }
Пример #10
0
        /// <summary>
        /// 将p_obj对象与p_objMove对象交换位置
        /// </summary>
        /// <param name="p_obj">源对象</param>
        /// <param name="p_objMove">交换位置对象</param>
        private void ObjectMove(DataRowView p_obj, DataRowView p_objMove)
        {
            if (!p_obj["DEEP"].Equals(p_objMove["DEEP"]))
            {
                return;
            }
            long sort = CDataConvert.ConToValue <long>(p_obj["Sort"]);

            p_obj.Row.BeginEdit();
            p_obj["Sort"] = p_objMove["Sort"];
            p_obj.Row.EndEdit();
            p_objMove.Row.BeginEdit();
            p_objMove["Sort"] = sort;
            p_objMove.Row.EndEdit();
            if (p_obj["DEEP"].Equals(2))
            {
                _UnitProject m_UnitProject_Y = p_obj["UnitProject"] as _UnitProject;
                if (m_UnitProject_Y != null)
                {
                    m_UnitProject_Y.Sort = ToolKit.ParseInt(p_obj["Sort"]);
                }
                _UnitProject m_UnitProject_M = p_objMove["UnitProject"] as _UnitProject;
                if (m_UnitProject_M != null)
                {
                    m_UnitProject_M.Sort = ToolKit.ParseInt(p_objMove["Sort"]);
                }
            }
            //this.m_DataSource.StructSource.ModelProject.UpDate(p_obj);
            //this.m_DataSource.StructSource.ModelProject.UpDate(p_objMove);
            this.treeList1.Refresh();
        }
Пример #11
0
        private void SetLibName(_UnitProject UnitProject, 单位工程 dx)
        {
            UnitProject.Property.DLibraries.ListGallery.Rule  = UnitProject.Property.Basis.QDGZ;
            UnitProject.Property.DLibraries.FixedLibrary.Rule = UnitProject.Property.Basis.DEGZ;

            if (dx.清单专业.Contains("安装"))
            {
                UnitProject.Property.DLibraries.ListGallery.LibName  = "安装清单库";
                UnitProject.Property.DLibraries.FixedLibrary.LibName = "安装定额价目表";
            }

            if (dx.清单专业.Contains("建筑"))
            {
                UnitProject.Property.DLibraries.ListGallery.LibName  = "建筑清单库";
                UnitProject.Property.DLibraries.FixedLibrary.LibName = "建筑装饰定额价目表";
            }
            if (dx.清单专业.Contains("绿化"))
            {
                UnitProject.Property.DLibraries.ListGallery.LibName  = "园林绿化清单库";
                UnitProject.Property.DLibraries.FixedLibrary.LibName = "绿化定额价目表";
            }
            if (dx.清单专业.Contains("市政"))
            {
                UnitProject.Property.DLibraries.ListGallery.LibName  = "市政清单库";
                UnitProject.Property.DLibraries.FixedLibrary.LibName = "市政定额价目表";
            }
        }
Пример #12
0
        public static void ModifyEdit_Sub(ModifyAttribute att, _Business bus, _UnitProject unit)
        {
            DataRow r = att.Source as DataRow;

            if (r != null)
            {
                if (r["LB"].ToString().Contains("子目") && att.FieldName == "GCL")
                {
                    decimal w = 0m;
                    int     m = ToolKit.ParseInt(APP.Application.Global.Configuration.Configs["工程量输入方式"]);
                    if (m > 0)
                    {
                        w = _Methods.GetNumber(r["DW"].ToString());
                    }

                    if (w == 0)
                    {
                        w = 1;
                    }
                    r["GCL"] = ToolKit.ParseDecimal((ToolKit.ParseDecimal(att.OriginalValue) * w).ToString("F4"));
                }
                else
                {
                    r[att.FieldName] = att.OriginalValue;
                }
                _Entity_SubInfo info = new _Entity_SubInfo();
                _ObjectSource.GetObject(info, att.Source as DataRow);
                GLODSOFT.QDJJ.BUSINESS._Methods met = GLODSOFT.QDJJ.BUSINESS._Methods.CreateIntace(bus, unit, info);
                _Modify_Method.Edit_Sub(att.FieldName, met, r);
            }
        }
Пример #13
0
        public string GetRepairBH(_UnitProject p_CUnitProject, string p_LB)
        {
            DataRow[] list = p_CUnitProject.StructSource.ModelQuantity.Select(string.Format("BH like '%BC{0}%'", this.GetLB(p_LB)), "BH");
            if (list.Count() == 0)
            {
                return("BC" + this.GetLB(p_LB) + "0001");
            }
            for (int i = 0, j = 1; j < list.Count(); i++, j++)
            {
                int info_i = ToolKit.ParseInt(list[i]["BH"].ToString().Substring(4));
                int info_j = ToolKit.ParseInt(list[j]["BH"].ToString().Substring(4));
                if ((info_j - info_i) > 1)
                {
                    return("BC" + this.GetLB(p_LB) + (info_i + 1).ToString("0000"));
                }
            }

            int info_b = ToolKit.ParseInt(list.First()["BH"].ToString().Substring(4));

            if (info_b == 1)
            {
                return("BC" + this.GetLB(p_LB) + (ToolKit.ParseInt(list.Last()["BH"].ToString().Substring(4)) + 1).ToString("0000"));
            }
            else
            {
                return("BC" + this.GetLB(p_LB) + "0001");
            }
        }
Пример #14
0
        private void ProjectTAdjust(decimal d)
        {
            _Projects p = this.CurrentBusiness.Current as _Projects;

            DataRow[] EnRows = this.CurrentBusiness.Current.StructSource.ModelProject.Select("PID = 1");

            foreach (DataRow row in EnRows)
            {
                _Engineering einfo = this.CurrentBusiness.Current.Create() as _Engineering;
                _ObjectSource.GetObject(einfo, row);


                DataRow[]    UnRows = this.CurrentBusiness.Current.StructSource.ModelProject.Select(string.Format("PID = {0}", einfo.ID));
                _UnitProject pinfo  = null;

                foreach (DataRow r in UnRows)
                {
                    pinfo = r["UnitProject"] as _UnitProject;
                    if (pinfo == null)
                    {
                        //反序列化
                        pinfo = (this.CurrentBusiness as _Pr_Business).GetObject(r["OBJECT"]) as _UnitProject;
                        //回写到表中
                        pinfo.InSerializable(einfo);
                        _ObjectSource.GetObject(pinfo, r);
                        this.CurrentBusiness.Current.StructSource.ModelProject.AppendUnit(pinfo);
                        //pinfo.Property = new _Un_Property(pinfo);
                        //pinfo.Reveal = new
                    }

                    UnitProject(d, pinfo);
                }
            }
        }
Пример #15
0
        static void ObjWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker ProjWorker = sender as BackgroundWorker;

            object[] param   = e.Argument as object[];
            FileInfo file    = param[0] as FileInfo;
            CResult  cresult = param[1] as CResult;

            using (FileStream stream = new FileStream(file.FullName, FileMode.Open, FileAccess.Read))
            {
                GZipStream zip = new GZipStream(stream, CompressionMode.Decompress);
                {
                    BinaryFormatter formater = new BinaryFormatter();
                    _FileHeader     header   = (_FileHeader)formater.Deserialize(zip);
                    _StructSource   ds       = (_StructSource)formater.Deserialize(zip);
                    //创建新的单位工程(单位工程业务体)
                    _UnitProject unit = new _UnitProject();
                    unit.Ready(ds);

                    /*obj.InSerializable(file);
                     *
                     * //初始化新的临时对象(不参与序列化此对象每次使用需要呗初始化)
                     * obj.Property.Temporary = new _Temporary();
                     * //默认同步临时库对象
                     * obj.Property.Temporary.Libraries = obj.Property.DLibraries.Copy();
                     * obj.Property.Temporary.Libraries.Init(APP.Application);*/
                    cresult.Value   = unit;
                    cresult.Success = true;
                    e.Result        = new object[] { file, cresult };
                }
                zip.Close();
            }
        }
Пример #16
0
 public QueryGallery(_UnitProject act)
 {
     this.Activitie = act;
     InitializeComponent();
     listGalleryIndex1.Folder  = APP.Application.Global.AppFolder;
     listGalleryIndex1.Default = this.Activitie;
 }
Пример #17
0
 private void UnitProject(decimal d, _UnitProject un)
 {
     foreach (_ObjectQuantityUnitInfo item in un.Property.GetAllQuantityUnit)
     {
         decimal d1 = item.XHL * d;
         item.XHL = d1;
     }
 }
Пример #18
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="p_Parent"></param>
 public _Project_Statistics(_UnitProject p_Parent, BUSINESS._Business business)
     : base(p_Parent)
 {
     this.Unit            = p_Parent;
     this.ResultVarable   = this.Unit.StructSource.ModelResultVariable;
     this.UNResultVarable = this.Unit.StructSource.ModelProjVariable;
     this.Business        = business;
 }
Пример #19
0
 public InventoryGraphAnalysis(_Business p_Business, _UnitProject p_Activitie, ABaseForm p_AParentForm)
 {
     this.CurrentBusiness  = p_Business;
     this.Activitie        = p_Activitie;
     this.AParentForm      = p_AParentForm;
     m_Methods_Subheadings = new _Methods_Subheadings(this.Activitie);
     InitializeComponent();
 }
Пример #20
0
 /// <summary>
 /// 带参数构造
 /// </summary>
 /// <param name="act">单位工程</param>
 public AtlasGalleryForm(_UnitProject act)
 {
     this.Activitie = act;
     this.ds        = this.Activitie.Property.Libraries.AtlasGallery.LibraryDataSet;
     InitializeComponent();
     this.atlasGallery1.buttonEdit1.Text     = this.Activitie.Property.Libraries.AtlasGallery.FullName;
     this.gridView3.OptionsBehavior.Editable = true;
 }
Пример #21
0
        /// <summary>
        /// 接触锁定单位工程
        /// </summary>
        /// <param name="p_UnitProject"></param>
        public void UnLockUnit(_UnitProject p_UnitProject)
        {
            XtraTabPageEx xtp = this.Find(p_UnitProject);

            if (xtp != null)
            {
                xtp.GetProjectForm.UnLockUnit();
            }
        }
Пример #22
0
        /// <summary>
        /// 删除指定单项工程选项卡(如果存在)
        /// </summary>
        /// <param name="infos"></param>
        public void Remove(_UnitProject info)
        {
            XtraTabPageEx xtp = this.Find(info);

            if (xtp != null)
            {
                this.TabPages.Remove(xtp);
            }
        }
Пример #23
0
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="p_Business">当前业务</param>
 /// <param name="p_Activitie">当前单位工程</param>
 /// <param name="p_AParentForm">父级窗体</param>
 public StandardConversionForm(_Business p_Business, _UnitProject p_Activitie, ABaseForm p_AParentForm)
 {
     this.CurrentBusiness         = p_Business;
     this.Activitie               = p_Activitie;
     this.AParentForm             = p_AParentForm;
     m_Methods_Subheadings        = new _Methods_Subheadings(this.Activitie);
     m_Methods_StandardConversion = new _Methods_StandardConversion(this.Activitie);
     InitializeComponent();
 }
Пример #24
0
 public AreaQuantityUnit(_Business p_Business, _UnitProject p_Activitie, ABaseForm p_AParentForm, string p_FormName)
 {
     this.CurrentBusiness  = p_Business;
     this.Activitie        = p_Activitie;
     this.AParentForm      = p_AParentForm;
     m_Methods_Subheadings = new _Methods_Subheadings(this.Activitie);
     this.Text             = p_FormName;
     InitializeComponent();
 }
Пример #25
0
        public static _Method_Sub GetSub(_Business bus, _UnitProject p_Unit)
        {
            _Entity_SubInfo Sub_info = new _Entity_SubInfo();
            DataRow         row      = p_Unit.StructSource.ModelSubSegments.GetRowByOther("1");

            _ObjectSource.GetObject(Sub_info, row);
            _Method_Sub mrt = new _Method_Sub(bus, p_Unit, Sub_info);

            return(mrt);
        }
Пример #26
0
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="p_Business">当前业务</param>
 /// <param name="p_Activitie">当前单位工程</param>
 /// <param name="p_AParentForm">父级窗体</param>
 public SubheadingsQuantityUnit(_Business p_Business, _UnitProject p_Activitie, ABaseForm p_AParentForm)
 {
     this.CurrentBusiness  = p_Business;
     this.Activitie        = p_Activitie;
     this.AParentForm      = p_AParentForm;
     m_Methods_Subheadings = new _Methods_Subheadings(this.Activitie);
     m_Methods_Quantity    = new _Methods_Quantity(this.Activitie);
     m_Methods_YTLBSummary = new _Methods_YTLBSummary(this.Activitie);
     InitializeComponent();
 }
Пример #27
0
        /// <summary>
        /// 是否存在此单位工程
        /// </summary>
        /// <param name="p_UnitProject"></param>
        /// <returns></returns>
        public bool IsExist(_UnitProject p_UnitProject)
        {
            XtraTabPageEx xtp = null;

            xtp = this.Find(p_UnitProject);
            if (xtp == null)
            {
                return(false);
            }
            return(true);
        }
Пример #28
0
 public static void ResetSerializeNumber(_UnitProject project)
 {
     DataRow[] rs1 = project.StructSource.ModelSubSegments.Select("(XH is null  or XH=0) and LB='清单'");
     if (rs1.Length > 0)//条件成立则需要重排
     {
         DataRow[] rows = project.StructSource.ModelSubSegments.Select("LB='清单'", "sort asc");
         for (int i = 0; i < rows.Length; i++)
         {
             rows[i]["XH"] = i + 1;
         }
     }
 }
Пример #29
0
        private void lookUpEdit1_EditValueChanged(object sender, EventArgs e)
        {
            //根据选择获取值
            _UnitProject obj = this.lookUpEdit1.EditValue as _UnitProject;

            //路径
            this.textEdit1.Text = obj.Name;

            this.buttonEdit1.Text = obj.Files.FullName;
            //名称
            this.ctrlAttributes2.IDataSource = obj.Reveal.Attributes;
            this.ctrlAttributes2.DataBind();
        }
Пример #30
0
        public static _Methods Build(_Business business, _UnitProject project, _Entity_SubInfo entity)
        {
            if (entity.SSLB == 0)
            {
                switch (entity.LB)
                {
                case "分部-专业":
                    return(new _Methods_Pro(business, project, entity));

                case "分部-章":
                    return(new _Method_Chapt(business, project, entity));

                case "分部-节":
                    return(new _Method_Fest(business, project, entity));

                case "清单":
                    return(new _Methods_Fixed(business, project, entity));

                case "子目":
                case "子目-增加费":
                case "子目-降效":
                    return(new _Methods_Subheadings(business, project, entity));

                default:
                    return(new _Method_Sub(business, project, entity));
                }
            }
            else
            {
                if (entity.PID == 0)
                {
                    return(new _Mothod_Measures(business, project, entity));
                }

                if (string.IsNullOrEmpty(entity.LB) && entity.PID != 0)
                {
                    return(new _Motheds_CommonProj(business, project, entity));
                }

                if (entity.LB.Equals("清单"))
                {
                    return(new _Mothods_MFixed(business, project, entity));
                }
                if (entity.LB.Contains("子目"))
                {
                    return(new _Mothods_MSubheadings(business, project, entity));
                }

                return(new _Mothod_Measures(business, project, entity));
            }
        }