Пример #1
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);
        }
Пример #2
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);
            }
        }
Пример #3
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);
        }
Пример #4
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;
 }
Пример #5
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);
        }
Пример #6
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));
            }
        }
Пример #7
0
        public static void ModifyEdit_Mea(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;
                }

                GLODSOFT.QDJJ.BUSINESS._Methods met = GLODSOFT.QDJJ.BUSINESS._Methods.CreateIntaceMet(bus, unit, r);
                switch (att.FieldName)
                {
                case "JSJC":
                case "FL":
                    met.Begin(null);
                    break;

                case "GCL":
                    met.UpGCL();
                    break;

                default:
                    break;
                }
            }
        }
Пример #8
0
        public static void ModifyEdit_Metaanalysis(ModifyAttribute att, _Business bus, _UnitProject unit)
        {
            DataRow r = att.Source as DataRow;

            if (r != null)
            {
                r[att.FieldName] = att.OriginalValue;
                if (att.FieldName == "Feature")
                {
                    DataTable ParamTable = APP.Application.Global.DataTamp.TempDataSet.Tables["Params_Metaanalysis"].Copy();
                    DataRow[] rows       = ParamTable.Select(string.Format("Code='{0}'", att.OriginalValue));
                    if (rows.Length > 0)
                    {
                        r["Name"] = rows[0]["Name"];
                    }
                }
                _Method_Metaanalysis Method = new _Method_Metaanalysis(unit);
                Method.Begin(null);
            }
        }
Пример #9
0
 public _Methods_Infomation(_UnitProject p_Unit, _Business p_bus)
 {
     m_Unit                 = p_Unit;
     this._UnInfo           = APP.UnInformation;
     this.m_CurrentBusiness = p_bus;
     method_Sub             = _Method_Sub.GetSub(this.m_CurrentBusiness, this.m_Unit);
     methods_Fixed          = new _Methods_Fixed(this.m_CurrentBusiness, this.m_Unit, null);
     dt = this.Unit.Property.Libraries.FixedLibrary.LibraryDataSet.Tables["材机表"].Copy();
     if (!dt.Columns.Contains("fl"))
     {
         dt.Columns.Add("fl", typeof(double));
     }
     if (!dt.Columns.Contains("SCDJ"))
     {
         dt.Columns.Add("SCDJ", typeof(double));
     }
     if (dt.PrimaryKey.Length == 0)
     {
         dt.PrimaryKey = new DataColumn[] { dt.Columns["CAIJBH"] };
     }
 }
Пример #10
0
        /// <summary>
        /// 初始化新的工作流(每次创建新业务的时候必须初始化)
        /// </summary>
        /// <param name="p_WorkFlowType">为哪个共组进行初始化操作</param>
        /// <returns></returns>
        public _Business Init(EWorkFlowType p_WorkFlowType)
        {
            _Business bus = null;

            switch (p_WorkFlowType)
            {
            case EWorkFlowType.PROJECT:    //容器
                bus = this.init_project();
                break;

            case EWorkFlowType.Engineering:    //容器
                bus = this.init_engineering();
                break;

            case EWorkFlowType.UnitProject:    //非容器
                bus = this.init_unitproject();
                break;
            }

            return(bus);
        }
Пример #11
0
 public _Methods_Pro(_Business m_Currentbus, _UnitProject p_Unit, _Entity_SubInfo p_info)
     : base(m_Currentbus, p_Unit, p_info)
 {
 }
Пример #12
0
 public _Mothod_Measures(_Business m_Currentbus, _UnitProject p_Unit, _Entity_SubInfo p_info)
     : base(m_Currentbus, p_Unit, p_info)
 {
 }
Пример #13
0
 public _Method_Sub_ImportExcel(_Business p_Bus, _UnitProject p_Unit)
 {
     this.Unit            = p_Unit;
     this.CurrentBusiness = p_Bus;
 }
Пример #14
0
 public _Method_OtherProject(_Business p_Bus, _UnitProject p_Unit)
 {
     this.m_Unit           = p_Unit;
     this._CurrentBusiness = p_Bus;
 }
Пример #15
0
 public _Measures_Statistics(_Entity_SubInfo p_info, _UnitProject p_Unit, _Business business)
     : base(p_info, p_Unit)
 {
 }
Пример #16
0
 public _Mothods_MSubheadings(_Business m_Currentbus, _UnitProject p_Unit, _Entity_SubInfo p_info)
     : base(m_Currentbus, p_Unit, p_info)
 {
 }
Пример #17
0
        //public _Method_Sub(_UnitProject p_Unit):base(p_Unit)
        //{

        //}
        public _Method_Sub(_Business m_Currentbus, _UnitProject p_Unit, _Entity_SubInfo m_Current)
            : base(m_Currentbus, p_Unit, m_Current)
        {
        }
Пример #18
0
 public _ImportXML(_Business bus)
 {
     this.m_Business = bus;
 }
Пример #19
0
 public Calculator(_Business business, GOLDSOFT.QDJJ.COMMONS._UnitProject project)
 {
     Business = business;
     Project  = project;
 }
Пример #20
0
 public static void Calculate(_Business business, GOLDSOFT.QDJJ.COMMONS._UnitProject project, params DataRow[] rows)
 {
     _Methods.Calculate(business, project, rows);
 }
Пример #21
0
        public static void Calculate(_Business business, _UnitProject project, params DataRow[] rows)
        {
            var entities = _Entity_SubInfo.ParseMore(rows);

            Calculate(business, project, entities.ToArray());
        }
Пример #22
0
 public static void Calculate(_Business business, GOLDSOFT.QDJJ.COMMONS._UnitProject project, params GOLDSOFT.QDJJ.COMMONS._Entity_SubInfo[] entities)
 {
     _Methods.Calculate(business, project, entities);
 }
Пример #23
0
 public _Methods(_Business m_Currentbus, _UnitProject p_Unit, _Entity_SubInfo m_Current)
 {
     this.m_Unit            = p_Unit;
     this.m_Current         = m_Current;
     this.m_CurrentBusiness = m_Currentbus;
 }
Пример #24
0
        public static void Calculate(_Business business, _UnitProject project, params _Entity_SubInfo[] entityes)
        {
            var zhuanye   = entityes.Select <_Entity_SubInfo, _Entity_SubInfo>(m => m.LB == "分部-专业" ? m : null).ToList();
            var zhang     = entityes.Select <_Entity_SubInfo, _Entity_SubInfo>(m => m.LB == "分部-章" ? m : null).ToList();
            var jie       = entityes.Select <_Entity_SubInfo, _Entity_SubInfo>(m => m.LB == "分部-节" ? m : null).ToList();
            var qingdan   = entityes.Select <_Entity_SubInfo, _Entity_SubInfo>(m => string.IsNullOrEmpty(m.LB) ? null : (m.LB.StartsWith("清单") ? m : null)).ToList();
            var zimu      = entityes.Select <_Entity_SubInfo, _Entity_SubInfo>(m => string.IsNullOrEmpty(m.LB) ? null : (m.LB.StartsWith("子目") ? m : null)).ToList();
            var root      = new List <_Entity_SubInfo>();
            var source    = project.StructSource;
            var processed = new List <string>();

            processed.Clear();
            foreach (_Entity_SubInfo z in zimu)
            {
                if (z == null)
                {
                    continue;
                }

                if (processed.Contains(z.ID.ToString()))
                {
                    continue;
                }
                else
                {
                    processed.Add(z.ID.ToString());
                }

                var method = Build(business, project, z);
                method.BeginCurrent();

                if (z.SSLB == 0)
                {
                    var rows1 = source.ModelSubSegments.Select("ID = '" + z.FPARENTID + "'");
                    qingdan.AddRange(_Entity_SubInfo.ParseMore(rows1));
                }
                else
                {
                    var rows2 = source.ModelMeasures.Select("ID = '" + z.FPARENTID + "'");
                    qingdan.AddRange(_Entity_SubInfo.ParseMore(rows2));
                }
            }

            processed.Clear();
            foreach (_Entity_SubInfo q in qingdan)
            {
                if (q == null)
                {
                    continue;
                }

                if (processed.Contains(q.ID.ToString()))
                {
                    continue;
                }
                else
                {
                    processed.Add(q.ID.ToString());
                }

                var method = Build(business, project, q);
                method.BeginCurrent();
                //method.Calculate();
                //method.Begin(null);


                if (q.SSLB == 0)
                {
                    var rows1 = source.ModelSubSegments.Select("ID = '" + q.PID + "'");
                    root.AddRange(_Entity_SubInfo.ParseMore(rows1));
                }
                else
                {
                    var rows2 = source.ModelMeasures.Select("ID = '" + q.PID + "'");
                    root.AddRange(_Entity_SubInfo.ParseMore(rows2));
                }
            }

            processed.Clear();
            foreach (_Entity_SubInfo j in jie)
            {
                if (j == null)
                {
                    continue;
                }

                if (processed.Contains(j.ID.ToString()))
                {
                    continue;
                }
                else
                {
                    processed.Add(j.ID.ToString());
                }

                var method = Build(business, project, j);

                method.BeginCurrent();
                //method.Calculate();
                //method.Begin(null);


                if (j.SSLB == 0)
                {
                    var rows1 = source.ModelSubSegments.Select("ID = '" + j.CPARENTID + "'");
                    zhang.AddRange(_Entity_SubInfo.ParseMore(rows1));
                }
                else
                {
                    var rows2 = source.ModelMeasures.Select("ID = '" + j.CPARENTID + "'");
                    zhang.AddRange(_Entity_SubInfo.ParseMore(rows2));
                }
            }

            processed.Clear();
            foreach (_Entity_SubInfo z in zhang)
            {
                if (z == null)
                {
                    continue;
                }

                if (processed.Contains(z.ID.ToString()))
                {
                    continue;
                }
                else
                {
                    processed.Add(z.ID.ToString());
                }

                var method = Build(business, project, z);

                method.BeginCurrent();
                //method.Calculate();
                //method.Begin(null);

                if (z.SSLB == 0)
                {
                    var rows1 = source.ModelSubSegments.Select("ID = '" + z.PPARENTID + "'");
                    zhuanye.AddRange(_Entity_SubInfo.ParseMore(rows1));
                }
                else
                {
                    var rows2 = source.ModelMeasures.Select("ID = '" + z.PPARENTID + "'");
                    zhuanye.AddRange(_Entity_SubInfo.ParseMore(rows2));
                }
            }

            processed.Clear();
            foreach (_Entity_SubInfo z in zhuanye)
            {
                if (z == null)
                {
                    continue;
                }

                if (processed.Contains(z.ID.ToString()))
                {
                    continue;
                }
                else
                {
                    processed.Add(z.ID.ToString());
                }

                var method = Build(business, project, z);
                method.BeginCurrent();

                var rows = source.ModelSubSegments.Select("ID = '" + z.PID + "'");
                root.AddRange(_Entity_SubInfo.ParseMore(rows));

                if (z.SSLB == 0)
                {
                    var rows1 = source.ModelSubSegments.Select("ID = '" + z.PID + "'");
                    root.AddRange(_Entity_SubInfo.ParseMore(rows1));
                }
                else
                {
                    var rows2 = source.ModelMeasures.Select("ID = '" + z.PID + "'");
                    root.AddRange(_Entity_SubInfo.ParseMore(rows2));
                }
            }

            processed.Clear();
            foreach (var r in root)
            {
                if (r == null)
                {
                    continue;
                }

                if (processed.Contains(r.ID.ToString()))
                {
                    continue;
                }
                else
                {
                    processed.Add(r.ID.ToString());
                    var method = Build(business, project, r);
                    method.BeginCurrent();
                    // method.Calculate();
                    method.Begin(null);
                }
            }
        }
Пример #25
0
 public ProjectAdjust(_Business b)
 {
     this.CurrentBusiness = b;
 }
Пример #26
0
 public _Motheds_CommonProj(_Business m_Currentbus, _UnitProject p_Unit, _Entity_SubInfo p_info)
     : base(m_Currentbus, p_Unit, p_info)
 {
 }