Exemplo n.º 1
0
        //christopher
        public static Model.mdlDailyMsgList GetDailyMessage(Model.mdlParam param)
        {
            var mdlDailyMsgList = new Model.mdlDailyMsgList();

            mdlDailyMsgList.DailyMessageList = DailyMessageFacade.LoadDailyMessage2(param);

            return(mdlDailyMsgList);
        }
Exemplo n.º 2
0
        //006 OPTIMAZE
        public static Model.mdlJsonList LoadJson(Model.mdlParam json)
        {
            //001
            var mdlJson     = new Model.mdlJson();
            var mdlJsonList = new List <Model.mdlJson>();

            var mdlCallPlan       = CallPlanFacade.LoadCallPlan(json);
            var mdlCallPlanDetail = CallPlanFacade.LoadCallPlanDetail(json);

            //--006
            var mdlCustomerList     = new List <Model.mdlCustomer>();
            var mdlCustomerTypeList = new List <Model.mdlCustomerType>();
            //mdlProductList = new List<Model.mdlProduct>();  //005 Close Code

            //--002
            var mdlCost = new List <Model.mdlCost>();
            var mdlDeliveryOrderList       = new List <Model.mdlDeliveryOrder>();
            var mdlDeliveryOrderDetailList = new List <Model.mdlDeliveryOrderDetail>();
            //002--

            var mdlProductList = new List <Model.mdlProduct>();

            var mdlDailyMsgList  = new List <Model.mdlDailyMsg>(); //003
            var mdlDailyCostList = new List <Model.mdlDailyCost>();

            var mdlReturOrderList       = new List <Model.mdlReturOrder>();
            var mdlReturOrderDetailList = new List <Model.mdlReturOrderDetail>();

            var mdlReasonList = new List <Model.mdlReason>();

            var mdlProductUOMList = new List <Model.mdlProductUOM>(); //007


            var mdlMobileConfigList = new List <Model.mdlMobileConfig>();


            var mdlWarehouseList = new List <Model.mdlWarehouse>();

            var mdlUnvalidDOProductList = new List <Model.mdlDeliveryOrderDetail>();

            var mdlVisit = new List <Model.mdlDBVisit>();

            var mdlVisitDetailList = new List <Model.mdlDBVisitDetail2>();

            //Wyeth
            var mdlPromoList = new List <Model.mdlPromo>();

            var mdlCompetitorActivityList = new List <Model.mdlCompetitorActivity>();

            var mdlCompetitor = new List <Model.mdlCompetitor>();

            var mdlPhotoTypeList = new List <Model.mdlPhotoType>();

            var mdlCompetitorProduct = new List <Model.mdlCompetitorProduct>();

            var mdlMenuMobileList = new List <Model.mdlMenuMobile>();

            var mdlPOSMProductList = new List <Model.mdlPOSM>();

            var mdlSisaStockType = new List <Model.mdlSisaStockType>();

            var mdlQuestion = new List <Model.mdlQuestion>();

            var mdlAnswer = new List <Model.mdlAnswer>();

            var mdlAnswerType = new List <Model.mdlAnswer_Type>();

            var mdlQuestionSet = new List <Model.mdlQuestion_Set>();

            var mdlQuestionCategory = new List <Model.mdlQuestion_Category>();

            var mdlCompetitorActivityType = new List <Model.mdlCompetitorActivityType>();

            var mdlDepositType = new List <Model.mdlDepositType>();

            //if (mdlCallPlan.Count > 0) -- fernandes

            //fernandes
            foreach (var cp in mdlCallPlan)
            {
                if (cp.Result == "FAILED" || mdlCallPlanDetail.Count == 0)
                {
                    mdlJson.Result = "Tidak ada call plan";
                }
                else if (cp.Result == "FINISH")
                {
                    mdlJson.Result = "Call plan sudah selesai";
                }
                else
                {
                    mdlCustomerList     = CustomerFacade.LoadCustomer(json);
                    mdlCustomerTypeList = CustomerTypeFacade.LoadCustomerType();

                    //mdlDeliveryOrderList = DeliveryOrderFacade.LoadDeliveryOrder(json);
                    //mdlDeliveryOrderDetailList = DeliveryOrderFacade.LoadDeliveryOrderDetail(json, mdlDeliveryOrderList);

                    //mdlUnvalidDOProductList = DeliveryOrderFacade.UnvalidDOProduct(mdlDeliveryOrderList);

                    mdlProductList = ProductFacade.LoadProduct(json);

                    //var mdlProductList = ProductFacade.LoadProduct();  //005 close code

                    //mdlReturOrderList = ReturFacade.LoadReturOrder(json);
                    //mdlReturOrderDetailList = ReturFacade.LoadReturOrderDetail(json);

                    mdlCost = CostFacade.LoadCost(); //002

                    mdlReasonList = ReasonFacade.LoadReason();
                    //christopher
                    mdlDailyMsgList = DailyMessageFacade.LoadDailyMessage2(json);                 //003
                    //christopher
                    mdlProductUOMList = ProductFacade.LoadProductUOM(mdlDeliveryOrderDetailList); //007

                    //christopher
                    mdlMobileConfigList = MobileConfigFacade.LoadMobileConfig(json);

                    //christopher
                    mdlWarehouseList = WarehouseFacade.LoadWarehouse(mdlCallPlan);

                    mdlVisit           = VisitFacade.LoadVisit(mdlCallPlan);
                    mdlVisitDetailList = VisitFacade.LoadVisitDetail(mdlVisit);

                    mdlDailyCostList = CostFacade.LoadDailyCost(mdlVisit);

                    //wyeth

                    mdlPromoList = PromoFacade.LoadPromo(json);

                    //mdlCompetitorActivityList = CompetitorFacade.LoadCompetitorActivity(json);

                    //mdlCompetitor = CompetitorFacade.LoadCompetitor(json);

                    //mdlCompetitorProduct = CompetitorFacade.LoadCompetitorProduct(json, mdlCompetitor);

                    mdlMenuMobileList = MenuFacade.LoadMenuMobile(json.Role);

                    mdlPOSMProductList = POSMFacade.LoadPOSMProduct();

                    mdlSisaStockType = SisaStockTypeFacade.LoadSisaStockType(json);

                    //mdlCompetitorActivityType = CompetitorActivityTypeFacade.LoadCompetitorActivityType(json);

                    mdlPhotoTypeList = PhotoTypeFacade.LoadPhotoType();

                    mdlQuestion = QuestionFacade.LoadQuestion(json);

                    //mdlAnswer = AnswerFacade.LoadAnswer();

                    //mdlAnswerType = AnswerFacade.LoadAnswerType();

                    //mdlQuestionSet = QuestionFacade.LoadQuestionSet();

                    //mdlQuestionCategory = QuestionFacade.LoadQuestionCategory();

                    mdlDepositType = DepositTypeFacade.LoadDepositType();

                    mdlJson.Result = "Unduh berhasil";
                }
            }
            //006--

            //var mdlVisitList = VisitFacade.LoadVisit(json);
            //var mdlVisitDetailList = VisitFacade.LoadVisitDetail(json);


            mdlJson.CustomerList     = mdlCustomerList;
            mdlJson.CustomerTypeList = mdlCustomerTypeList;

            mdlJson.DeliveryOrderList       = mdlDeliveryOrderList;
            mdlJson.DeliveryOrderDetailList = mdlDeliveryOrderDetailList;

            mdlJson.ProductList = mdlProductList;
            //mdlJson.ProductList = mdlProductList; //05 Close Code

            mdlJson.ReturOrderList       = mdlReturOrderList;
            mdlJson.ReturOrderDetailList = mdlReturOrderDetailList;

            mdlJson.CallPlanList       = mdlCallPlan;
            mdlJson.CallPlanDetailList = mdlCallPlanDetail;

            mdlJson.CostList = mdlCost;                 //002

            mdlJson.DailyMessageList = mdlDailyMsgList; //003

            mdlJson.ReasonList = mdlReasonList;

            mdlJson.ProductUOMList = mdlProductUOMList; //007

            //christopher
            mdlJson.MobileConfigList = mdlMobileConfigList;

            mdlJson.WarehouseList = mdlWarehouseList;

            mdlJson.UnvalidDOProductList = mdlUnvalidDOProductList;

            mdlJson.Visit           = mdlVisit;
            mdlJson.VisitDetailList = mdlVisitDetailList;

            mdlJson.DailyCostList = mdlDailyCostList;

            //wyeth

            mdlJson.PromoList = mdlPromoList;
            //mdlJson.CompetitorActivityList = mdlCompetitorActivityList;
            mdlJson.CompetitorList             = mdlCompetitor;
            mdlJson.SisaStockTypeList          = mdlSisaStockType;
            mdlJson.CompetitorActivityTypeList = mdlCompetitorActivityType;
            mdlJson.CompetitorProductList      = mdlCompetitorProduct;
            mdlJson.MenuMobileList             = mdlMenuMobileList;
            mdlJson.POSMProductList            = mdlPOSMProductList;
            mdlJson.PhotoTypeList        = mdlPhotoTypeList;
            mdlJson.QuestionList         = mdlQuestion;
            mdlJson.AnswerList           = mdlAnswer;
            mdlJson.AnswerTypeList       = mdlAnswerType;
            mdlJson.QuestionSetList      = mdlQuestionSet;
            mdlJson.QuestionCategoryList = mdlQuestionCategory;

            mdlJson.DepositTypeList = mdlDepositType;

            //mdlJson.VisitList = mdlVisitList;
            //mdlJson.VisitDetailList = mdlVisitDetailList;

            var mdlJsonListNew = new Model.mdlJsonList();

            mdlJsonList.Add(mdlJson);
            mdlJsonListNew.mdlJson = mdlJsonList;

            return(mdlJsonListNew);
            //001
        }