Пример #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="cwpId"></param>
        /// <param name="drawingId"></param>
        /// <param name="taskCategoryCodeList"></param>
        /// <param name="taskTypeIdList"></param>
        /// <param name="materialIdList"></param>
        /// <param name="progressIdList"></param>
        /// <param name="searchcValue"></param>
        /// <param name="projectId"></param>
        /// <param name="disciplineCode"></param>
        /// <param name="path"></param>
        /// <param name="grouppage"></param>
        /// <returns></returns>
        public MTOAndDrawing GetComponentProgressForScheduling(int cwpId
                                                                ,int projectscheduleId
                                                                ,int drawingId
                                                                ,List<string> taskCategoryCodeList
                                                                ,List<int> taskTypeIdList
                                                                ,List<int> materialIdList
                                                                ,List<int> progressIdList
                                                                ,string searchValue
                                                                ,int projectId
                                                                ,string disciplineCode
                                                                ,string path
                                                                ,int grouppage)
        {
            Common comm = new Common();

            MTOAndDrawing rtn = new MTOAndDrawing();
            MTOPageTotal p = new MTOPageTotal();

            string xmlID1s = (taskCategoryCodeList == null) ? "" : Element.Shared.Common.Utilities.BuildIDArrayXMLParametr(taskCategoryCodeList.ToArray());
            string xmlID2s = (taskTypeIdList == null) ? "" : Element.Shared.Common.Utilities.BuildIDArrayXMLParametr(taskTypeIdList.ToArray());
            string xmlID3s = (materialIdList == null) ? "" : Element.Shared.Common.Utilities.BuildIDArrayXMLParametr(materialIdList.ToArray());
            string xmlID4s = (progressIdList == null) ? "" : Element.Shared.Common.Utilities.BuildIDArrayXMLParametr(progressIdList.ToArray());

            //string projectpath = comm.GetProjectPath(projectId, "URL");
            //path = path + projectpath + "/";

            p = GetComponentProgressForSchedulingXmlParametrPaging(cwpId, projectscheduleId, drawingId, xmlID1s, xmlID2s, xmlID3s, xmlID4s, searchValue, projectId, disciplineCode, grouppage);

            rtn.mto = p.mto;
            rtn.TotalGroupPageCount = p.TotalPageCount;

            if (rtn.mto != null)
            {
                var x = (from m in rtn.mto select m.DrawingID).Distinct();
                string drawingIDs = Element.Shared.Common.Utilities.BuildIDArrayXMLParametr(x.ToArray());

                if (!string.IsNullOrEmpty(drawingIDs))
                {
                    rtn.drawing = comm.GetComboDrawingByIDs(path, drawingIDs);
                }
            }

            return rtn;
        }