Ejemplo n.º 1
0
        internal static RoutingFileModel Mapping(USR_TMMA_ROUTING_FILE o)
        {
            try
            {
                if (o != null)
                {
                    return(new RoutingFileModel()
                    {
                        RoutingFileID = o.RoutingFileID,
                        RecObjectName = o.RecObjectName,
                        UserSAP = o.UserSAP,
                        RoutingFilePath = o.RoutingFilePath,
                        RoutingFileVersion = o.RoutingFileVersion,
                        RoutingFileStatus = o.RoutingFileStatus,
                        ProductsTypeID = o.ProductsTypeID,
                        FileStatus = FileStatusDAL.GetFileStatus(o.RoutingFileStatus),
                        IsActive = o.IsActive == 1,
                        CreatedBy = o.CreatedBy,
                        CreatedDate = o.CreatedDate,
                        UpdatedBy = o.UpdatedBy,
                        UpdatedDate = o.UpdatedDate,
                        ValidDate = o.ValidDate
                    });
                }

                return(null);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        internal static InspectionPlanFileModel Mapping(USR_TMMA_INSPECTION_PLAN_FILE o)
        {
            try
            {
                if (o != null)
                {
                    return(new InspectionPlanFileModel()
                    {
                        InspectionPlanFileID = o.InspectionPlanFileID,
                        RecObjectName = o.RecObjectName,
                        UserSAP = o.UserSAP,
                        InspectionPlanFilePath = o.InspectionPlanFilePath,
                        InspectionPlanFileVersion = o.InspectionPlanFileVersion,
                        InspectionPlanFileStatus = o.InspectionPlanFileStatus,
                        FileStatus = FileStatusDAL.GetFileStatus(o.InspectionPlanFileStatus),
                        ProductsTypeID = o.ProductsTypeID,
                        ValidDate = o.ValidDate,
                        IsActive = o.IsActive == 1,
                        CreatedBy = o.CreatedBy,
                        CreatedDate = o.CreatedDate,
                        UpdatedBy = o.UpdatedBy,
                        UpdatedDate = o.UpdatedDate
                    });
                }

                return(null);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
        internal static List <BOMFileModel> Mapping(List <USR_TMMA_BOM_FILE> list)
        {
            ACTION = "Mapping(List<USR_TMMA_BOM_FILE>)";

            try
            {
                if (list != null && list.Count > 0)
                {
                    List <BOMFileModel> mList = new List <BOMFileModel>();

                    foreach (USR_TMMA_BOM_FILE o in list)
                    {
                        mList.Add(new BOMFileModel()
                        {
                            BOMFileID      = o.BOMFileID,
                            RecObjectName  = o.RecObjectName,
                            UserSAP        = o.UserSAP,
                            BOMFilePath    = o.BOMFilePath,
                            BOMFileVersion = o.BOMFileVersion,
                            BOMFileStatus  = o.BOMFileStatus,
                            FileStatus     = FileStatusDAL.GetFileStatus(o.BOMFileStatus),
                            ProductsTypeID = o.ProductsTypeID,
                            ValidDate      = o.ValidDate,
                            IsActive       = o.IsActive == 1,
                            CreatedBy      = o.CreatedBy,
                            CreatedDate    = o.CreatedDate,
                            UpdatedBy      = o.UpdatedBy,
                            UpdatedDate    = o.UpdatedDate
                        });
                    }

                    return(mList);
                }

                return(null);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 4
0
        internal static List <AssignMaterialToRoutingFileModel> Mapping(List <USR_TMMA_ASSIGN_MATERIAL_TO_ROUTING_FILE> list)
        {
            ACTION = "Mapping(List<USR_TMMA_ASSIGN_MATERIAL_TO_ROUTING_FILE>)";

            try
            {
                if (list != null && list.Count > 0)
                {
                    List <AssignMaterialToRoutingFileModel> mList = new List <AssignMaterialToRoutingFileModel>();

                    foreach (USR_TMMA_ASSIGN_MATERIAL_TO_ROUTING_FILE o in list)
                    {
                        mList.Add(new AssignMaterialToRoutingFileModel()
                        {
                            AssignMaterialToRoutingFileID = o.AssignMaterialToRoutingFileID,
                            RecObjectName = o.RecObjectName,
                            UserSAP       = o.UserSAP,
                            AssignMaterialToRoutingFilePath    = o.AssignMaterialToRoutingFilePath,
                            AssignMaterialToRoutingFileVersion = o.AssignMaterialToRoutingFileVersion,
                            AssignMaterialToRoutingFileStatus  = o.AssignMaterialToRoutingFileStatus,
                            FileStatus     = FileStatusDAL.GetFileStatus(o.AssignMaterialToRoutingFileStatus),
                            ProductsTypeID = o.ProductsTypeID,
                            IsActive       = o.IsActive == 1,
                            CreatedBy      = o.CreatedBy,
                            CreatedDate    = o.CreatedDate,
                            UpdatedBy      = o.UpdatedBy,
                            UpdatedDate    = o.UpdatedDate
                        });
                    }

                    return(mList);
                }

                return(null);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }