Esempio n. 1
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private DataTable GetParentDt(DEBusinessItem item)
        {
            if (item == null)
            {
                return(null);
            }
            var dt  = BuildParentDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "InvCode":
                    val      = item.GetAttrValue(item.ClassName, "CODE");
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "ParentScrap":
                    row[col] = val == null ? 0m : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private DataTable GetVertionDt(DEBusinessItem item)
        {
            if (item == null)
            {
                return(null);
            }
            var dt  = BuildVersionDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "Version":
                    row[col] = item.LastRevision;
                    break;

                case "Status":
                    row[col] = val == null ? 3 : val;
                    break;

                case "BomType":
                    row[col] = val == null ? 1 : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 3
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetDataTable(DEBusinessItem dEBusinessItem)
        {
            if (dEBusinessItem == null)
            {
                return(null);
            }
            var dt  = BuildElementDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "group_code":
                    row[col] = val == null ? "01" : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 4
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private DataTable GetHeadDt(DEBusinessItem item)
        {
            if (item == null)
            {
                return(null);
            }
            var dt  = BuildHeadDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "Description":
                    row[col] = item.Name;
                    break;

                case "ResType":
                case "FeeType":
                case "BaseType":
                    row[col] = val == null ? 1 : val;;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 5
0
        /// <summary>
        /// 获取OperationRes数据
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private DataTable GetOperationInspDt(DEBusinessItem item)
        {
            if (item == null)
            {
                return(null);
            }

            var dt  = BuildOperationInspDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());

                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "QTMethod":
                    if (val == null)
                    {
                        return(null);
                    }
                    row[col] = val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 6
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetDataTable(DEBusinessItem dEBusinessItem)
        {
            if (dEBusinessItem == null)
            {
                return(null);
            }
            var dt  = BuildElementDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "Description":
                    row[col] = dEBusinessItem.Name;
                    break;

                case "CalendarCode":
                    row[col] = "SYSTEM";
                    break;

                case "ProductLineFlag":
                    row[col] = val == null ? 1 : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 7
0
        /// <summary>
        /// 获取header节点数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetHeaderTable(DEBusinessItem dEBusinessItem)
        {
            if (dEBusinessItem == null)
            {
                return(null);
            }
            var     dt  = BuildHeaderDt();
            DataRow row = dt.NewRow();

            #region 普通节点,默认ERP列名和PLM列名一致
            foreach (DataColumn col in dt.Columns)
            {
                var val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "CreatePerson":
                    row[col] = PrintUtil.GetUserName(dEBusinessItem.Creator);
                    break;

                case "ModifyPerson":
                    row[col] = PrintUtil.GetUserName(dEBusinessItem.LatestUpdator);
                    break;

                case "ModifyDate":
                    row[col] = dEBusinessItem.LatestUpdateTime;
                    break;

                case "unitgroup_code":
                    row[col] = val == null ? "01" : val;
                    break;

                case "cPlanMethod":
                    row[col] = val == null ? "L" : val;
                    break;

                case "cSRPolicy":
                    row[col] = val == null ? "PE" : val;
                    break;

                case "iSupplyType":
                    row[col] = val == null ? 0 : val;
                    break;
                }
            }
            #endregion

            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 8
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="bomItem"></param>
        /// <returns></returns>
        private DataTable GetComponentOptDt(DEBusinessItem bomItem, DERelation2 relation, int seq)
        {
            if (bomItem == null)
            {
                return(null);
            }
            var dt  = BuildComponentOptDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val    = bomItem.GetAttrValue(bomItem.ClassName, col.ColumnName.ToUpper());
                var rltVal = relation.GetAttrValue(col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = rltVal == null ? DBNull.Value : rltVal;
                    break;

                case "OptionsId":
                    row[col] = seq * 10;
                    break;

                case "Offset":
                    row[col] = rltVal == null ? 0 : rltVal;
                    break;

                case "WIPType":
                    row[col] = rltVal == null ? 4 : rltVal;
                    break;

                case "AccuCostFlag":
                    row[col] = rltVal == null ? true : rltVal;
                    break;

                case "OptionalFlag":
                    row[col] = rltVal == null ? false : rltVal;
                    break;

                case "MutexRule":
                    row[col] = rltVal == null ? 2 : rltVal;
                    break;

                case "PlanFactor":
                    row[col] = rltVal == null ? 100.00m : rltVal;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 9
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetRoutingInspDt(DEBusinessItem baseItem, DEBusinessItem item, DERelation2 relation)
        {
            if (item == null)
            {
                return(null);
            }
            var dt  = BuildRoutingInspDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val    = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());
                var rltVal = relation.GetAttrValue(col.ColumnName);
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "PRoutinginspId":
                    val = item.GetAttrValue(item.ClassName, "OPERATIONINSPID");
                    if (val == null)
                    {
                        return(null);
                    }
                    row[col] = val;
                    break;

                case "OpTransType":    //工序转移默认“手动”
                case "QtMethod":
                case "ItestRule":
                    row[col] = val == null ? 1 : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 10
0
        /// <summary>
        /// 获取实际属性值,主要用于处理属性数据类型不对应的空属性
        /// </summary>
        /// <param name="category">属性类型</param>
        /// <param name="attrName">属性名称</param>
        /// <param name="item">当前对象</param>
        /// <param name="col">列</param>
        /// <returns></returns>
        private object GetAttrValue(string category, string attrName, DEBusinessItem item, DataColumn col)
        {
            if (string.IsNullOrEmpty(category) || string.IsNullOrEmpty(attrName) || item == null || col == null)
            {
                return(DBNull.Value);
            }
            var originVal = item.GetAttrValue(category, attrName);

            if (originVal != null && !string.IsNullOrEmpty(originVal.ToString()))
            {
                return(originVal);
            }
            return(DBNull.Value);
        }
Esempio n. 11
0
        /// <summary>
        /// 获取entry节点数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetEntryDt(DEBusinessItem dEBusinessItem)
        {
            if (dEBusinessItem == null)
            {
                return(null);
            }
            var     dt  = BuildEntryDt();
            DataRow row = dt.NewRow();

            #region 普通节点,默认ERP列名和PLM列名一致
            foreach (DataColumn col in dt.Columns)
            {
                var val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, col.ColumnName.ToUpper());
                if (col.ColumnName == "invcode")
                {
                    val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, "CODE");
                }
                row[col] = val == null ? DBNull.Value : val;
            }
            #endregion

            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 12
0
        /// <summary>
        /// 获取sender序号设置
        /// </summary>
        /// <param name="item"></param>
        private void GetSenderSeq(DEBusinessItem item)
        {
            var senderSeq = item.GetAttrValue(item.ClassName, EAI_SENDER_SEQ) == null ? "0" : item.GetAttrValue(item.ClassName, EAI_SENDER_SEQ).ToString();
            var seqArr    = senderSeq.Split(',');

            if (seqArr == null || seqArr.Length == 0)
            {
                return;
            }
            _senderSeq = new int[seqArr.Length];
            for (int i = 0; i < seqArr.Length; i++)
            {
                var seq = Convert.ToInt16(seqArr[i].Trim());
                _senderSeq[i] = seq;
            }
        }
Esempio n. 13
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetComponentLocDt(DEBusinessItem dEBusinessItem, DERelation2 relation)
        {
            if (dEBusinessItem == null)
            {
                return(null);
            }
            var dt  = BuildVersionDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, col.ColumnName.ToUpper());
                row[col] = val == null ? DBNull.Value : val;
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 14
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private DataTable GetBodyDt(DEBusinessItem baseItem, DEBusinessItem item, DERelation2 relation)
        {
            if (item == null)
            {
                return(null);
            }
            var dt  = BuildBodyDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val    = baseItem.GetAttrValue(baseItem.ClassName, col.ColumnName.ToUpper());
                var rltVal = relation.GetAttrValue(col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = rltVal == null ? DBNull.Value : rltVal;
                    break;

                case "ResId":
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "Qty":
                    row[col] = rltVal == null ? 1.00m : rltVal;
                    break;

                case "KeyFlag":
                case "FiniteScheduleRel":
                    row[col] = rltVal == null ? 0 : rltVal;
                    break;

                case "CrpFlag":
                    row[col] = rltVal == null ? 1 : rltVal;
                    break;

                case "UseRate":
                case "EfficiencyRate":
                case "OverRate":
                    row[col] = rltVal == null ? 100.00m : rltVal;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 15
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetRoutingResDt(DEBusinessItem baseItem, DEBusinessItem item, DERelation2 relation)
        {
            if (item == null)
            {
                return(null);
            }
            var dt  = BuildRoutingInspDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());
                row[col] = val == null ? DBNull.Value : val;
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 16
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetOperationDetailDt(DEBusinessItem dEBusinessItem)
        {
            if (dEBusinessItem == null)
            {
                return(null);
            }
            var dt  = BuildOperationDetailDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, col.ColumnName.ToUpper());

                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "WcCode":
                    row[col] = val == null ? DBNull.Value : val;
                    _hasRss  = val != null;
                    break;

                case "DeliverDays":
                    row[col] = val == null ? 0 : val;
                    break;

                case "RltOptionFlag":
                case "SubFlag":
                case "IsBF":
                case "IsPlanSub":
                    row[col] = val == null ? false : val;
                    break;

                case "IsFee":
                case "IsReport":
                    row[col] = val == null ? true : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 17
0
        /// <summary>
        /// 根据属性获取对象
        /// </summary>
        /// <param name="currentAttr">当前属性</param>
        /// <param name="matchAttr">匹配的属性</param>
        private DEBusinessItem[] GetMatchItems(GenericAttribute currentAttr, GenericAttribute matchAttr)
        {
            if (currentAttr == null || matchAttr == null)
            {
                return(null);
            }
            var currentValue = _currentItem.GetAttrValue(_currentItem.ClassName, currentAttr.Name);

            if (currentValue == null)
            {
                return(null);
            }
            var       attrName = string.Format("{0}.{1}", matchAttr.Category, matchAttr.Name);
            Hashtable hashTb   = new Hashtable()
            {
                { attrName, currentValue }
            };
            var items = PLItem.Agent.GetBizItemsByAttr(matchAttr.ClassName, hashTb, ClientData.LogonUser.Oid);

            return(items);
        }
Esempio n. 18
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="dEBusinessItem"></param>
        /// <returns></returns>
        private DataTable GetDataTable(DEBusinessItem dEBusinessItem)
        {
            if (dEBusinessItem == null)
            {
                return(null);
            }
            var dt  = BuildElementDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val = dEBusinessItem.GetAttrValue(dEBusinessItem.ClassName, col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "type":
                    if (val == null)
                    {
                        MessageBoxPLM.Show("计量单位组类别不可为空!");
                        return(null);
                    }
                    var cur = Convert.ToInt32(val);
                    if (cur != 1 && cur != 2 && cur != 0)
                    {
                        MessageBoxPLM.Show("计量单位组类别输入类型不正确!只可填写0(无换算)、1(固定换算)、2(浮动)。");
                        return(null);
                    }
                    row[col] = val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 19
0
        /// <summary>
        /// 获取OperationRes数据
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private DataTable GetOperationResDt(DEBusinessItem baseItem, DEBusinessItem item, DERelation2 relation)
        {
            if (item == null)
            {
                return(null);
            }

            var dt  = BuildOperationResDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val    = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());
                var rltVal = relation.GetAttrValue(col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = rltVal == null ? DBNull.Value : rltVal;
                    break;

                case "OperationId":
                    val      = baseItem.GetAttrValue(baseItem.ClassName, col.ColumnName.ToUpper());
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "BaseType":
                    row[col] = val == null ? 1 : val;
                    break;

                case "EfficientRate":
                    row[col] = val == null ? 100 : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 20
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="bomItem"></param>
        /// <returns></returns>
        private DataTable GetComponentDt(DEBusinessItem baseItem, DERelation2 relation, DEBusinessItem bomItem, ref int seqNo)
        {
            if (bomItem == null)
            {
                return(null);
            }
            var dt  = BuildComponentDt();
            var row = dt.NewRow();

            seqNo++;
            foreach (DataColumn col in dt.Columns)
            {
                var val    = bomItem.GetAttrValue(bomItem.ClassName, col.ColumnName.ToUpper());
                var rltVal = relation.GetAttrValue(col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "BomId":
                    val      = baseItem.GetAttrValue(baseItem.ClassName, "BOMID");
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "InvCode":
                    val      = bomItem.GetAttrValue(bomItem.ClassName, "CODE");
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "SortSeq":
                case "OptionsId":
                case "OpComponentId":
                    row[col] = (seqNo * 10);
                    break;

                case "OpSeq":
                    row[col] = 0000;    //工序不启用,默认为0000
                    break;

                case "EffBegDate":
                    row[col] = rltVal == null?DateTime.Parse("2000-01-01") : rltVal;

                    break;

                case "EffEndDate":
                    row[col] = rltVal == null?DateTime.Parse("2099-12-31") : rltVal;

                    break;

                case "FVFlag":
                case "ProductType":
                    row[col] = rltVal == null ? 1 : rltVal;
                    break;

                case "BaseQtyN":
                    val      = relation.GetAttrValue("NUMBER");
                    row[col] = val == null ? 1m : val;
                    break;

                case "BaseQtyD":
                    row[col] = rltVal == null ? 1m : rltVal;
                    break;

                case "CompScrap":
                    row[col] = rltVal == null ? 0.000m : rltVal;
                    break;

                case "ByproductFlag":
                    row[col] = val == null ? false : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }
Esempio n. 21
0
 private void ResCombo_DragDrop(object sender, DragEventArgs e)
 {
     if (!base.ReadOnly)
     {
         this.LoadData();
         DEMetaAttribute deMetaAttri = this.deMetaAttri;
         CLCopyData      data        = new CLCopyData();
         data = (CLCopyData)e.Data.GetData(typeof(CLCopyData));
         if (data != null)
         {
             string combination;
             if (data[0] is DEBusinessItem)
             {
                 DEBusinessItem item = (DEBusinessItem)data[0];
                 combination = deMetaAttri.Combination;
                 foreach (DEMetaAttribute attribute2 in this.Attrs)
                 {
                     if (deMetaAttri.Combination.IndexOf("[" + attribute2.Name + "]") > -1)
                     {
                         combination = combination.Replace("[" + attribute2.Name + "]", item.GetAttrValue(this.className, attribute2.Name).ToString());
                     }
                 }
                 combination      = combination.Replace("[ID]", item.Id.ToString());
                 this.Text        = combination.Trim();
                 this.ResourceOid = item.MasterOid;
             }
             else
             {
                 DECopyData data2 = (DECopyData)data[0];
                 if (data2 != null)
                 {
                     if (data2.ClassName != this.className)
                     {
                         MessageBoxPLM.Show("资源类不匹配", "工程资源", MessageBoxButtons.OK);
                     }
                     else
                     {
                         DataRowView view = (DataRowView)data2.ItemList[0];
                         if (view != null)
                         {
                             if ((deMetaAttri != null) && (deMetaAttri.LinkType == 1))
                             {
                                 combination = deMetaAttri.Combination;
                                 foreach (DEMetaAttribute attribute3 in this.Attrs)
                                 {
                                     if (deMetaAttri.Combination.IndexOf("[" + attribute3.Name + "]") > -1)
                                     {
                                         string str2 = "PLM_" + attribute3.Name;
                                         combination = combination.Replace("[" + attribute3.Name + "]", Convert.ToString(view[str2]));
                                     }
                                 }
                                 if (ResFunc.IsRefRes(this.classOid))
                                 {
                                     string str3 = "PLM_M_ID";
                                     combination = combination.Replace("[ID]", Convert.ToString(view[str3]));
                                 }
                                 this.Text = combination.Trim();
                             }
                             else
                             {
                                 this.Text = view["PLM_ID"].ToString();
                             }
                             this.ResourceOid = new Guid((byte[])view["PLM_OID"]);
                         }
                     }
                 }
             }
         }
     }
 }
Esempio n. 22
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private DataTable GetRoutingDetailDt(DEBusinessItem baseItem, DEBusinessItem item, DERelation2 relation)
        {
            if (item == null)
            {
                return(null);
            }
            var dt  = BuildRoutingDetailDt();
            var row = dt.NewRow();

            foreach (DataColumn col in dt.Columns)
            {
                var val    = item.GetAttrValue(item.ClassName, col.ColumnName.ToUpper());
                var rltVal = relation.GetAttrValue(col.ColumnName.ToUpper());
                switch (col.ColumnName)
                {
                default:
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "PRoutingId":
                    val      = baseItem.GetAttrValue(baseItem.ClassName, col.ColumnName.ToUpper());
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "PRoutingDId":
                    val      = item.GetAttrValue(item.ClassName, "OPERATIONID");
                    row[col] = val == null ? DBNull.Value : val;

                    break;

                case "OperationCode":
                    val      = item.GetAttrValue(item.ClassName, "OPCODE");
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "PRoutinginspId":
                    val      = item.GetAttrValue(item.ClassName, "OPERATIONINSPID");
                    row[col] = val == null ? DBNull.Value : val;
                    break;

                case "Description":
                    row[col] = item.Name;
                    break;

                case "WcCode":
                case "EffBegDate":
                case "EffEndDate":
                case "OpSeq":
                    row[col] = rltVal == null ? DBNull.Value : rltVal;
                    break;

                case "SubFlag":
                case "RltOptionFlag":
                case "BFFlag":
                case "FeeFlag":
                case "PlanSubFlag":
                    row[col] = rltVal == null ? false : val;
                    break;

                case "DeliveryDays":
                case "LtPercent":
                    row[col] = rltVal == null ? 0 : val;
                    break;

                case "ReportFlag":
                    row[col] = rltVal == null ? true : val;
                    break;
                }
            }
            dt.Rows.Add(row);
            return(dt);
        }