示例#1
0
        /// <summary>
        /// THACHNN : 08/11/2005
        /// Return data for rendering CPO Report,
        /// </summary>
        /// <param name="pstrPlanType">MPS or MRP string</param>
        /// <param name="pnCCNID"></param>
        /// <param name="pnMonth"></param>
        /// <param name="pnYear"></param>
        /// <param name="pnCycle"></param>
        /// <param name="pnProductionLineID"></param>
        /// <param name="pnMasterLocationID"></param>
        /// <param name="pnCategoryID"></param>
        /// <returns></returns>

        public DataTable GetCPOReportData(string pstrPlanType, int pnCCNID, int pnMonth, int pnYear, int pnCycle,
                                          int pnProductionLineID, int pnMasterLocationID, int pnCategoryID,
                                          int pnVendorID, int pnProductID, string pstrModel)
        {
            C1PrintPreviewDialogDS objDS = new C1PrintPreviewDialogDS();

            pstrPlanType = pstrPlanType.Trim();
            if (pstrPlanType == PlanTypeEnum.MPS.ToString())
            {
                return(objDS.GetMPS_CPOReportData(pnCCNID, pnMonth, pnYear, pnCycle, pnProductionLineID,
                                                  pnMasterLocationID, pnCategoryID, pnVendorID, pnProductID, pstrModel));
            }
            else if (pstrPlanType == PlanTypeEnum.MRP.ToString())
            {
                return(objDS.GetMRP_CPOReportData(pnCCNID, pnMonth, pnYear, pnCycle, pnProductionLineID,
                                                  pnMasterLocationID, pnCategoryID, pnVendorID, pnProductID, pstrModel));
            }
            else
            {
                return(new DataTable());
            }
        }