Ejemplo n.º 1
0
        public ActionResult CMS180_InstallationHistory(string ContractProjectCode, string MaintenanceNo, string SlipNo)
        {
            ObjectResultData res = new ObjectResultData();

            try
            {
                //IInstallationHandler hand = ServiceContainer.GetService<IInstallationHandler>() as IInstallationHandler;
                //List<tbt_InstallationHistory> lst = hand.GetTbt_InstallationHistory(ContractProjectCode, MaintenanceNo, null);
                IInstallationHandler hand = ServiceContainer.GetService <IInstallationHandler>() as IInstallationHandler;

                //List<dtInstallationHistoryForView> lst = hand.GetTbt_InstallationHistoryForView(
                //                                             ServiceType.C_SERVICE_TYPE_SALE,
                //                                             ServiceType.C_SERVICE_TYPE_RENTAL,
                //                                             MiscType.C_SALE_INSTALL_TYPE,
                //                                             MiscType.C_RENTAL_INSTALL_TYPE,
                //                                             ChangeReasonType.C_CHANGE_REASON_TYPE_CUSTOMER,
                //                                             ChangeReasonType.C_CHANGE_REASON_TYPE_SECOM,
                //                                             MiscType.C_CUSTOMER_REASON,
                //                                             MiscType.C_SECOM_REASON,
                //                                             ContractProjectCode, MaintenanceNo, null);

                List <dtInsHistory> lst = hand.GetSlipNoHistory(SlipNo);

                //Comment by Jutarat A. on 08052013 (Sort from sp_IS_GetSlipNoHistory)
                //var sortedList = from p in lst
                //                 orderby p.SlipNo
                //                 select p;
                //lst = sortedList.ToList<dtInsHistory>();
                //End Comment

                ComboBoxModel cboModel = new ComboBoxModel();
                cboModel.SetList <dtInsHistory>(lst, "SlipNo", "SlipNo");
                res.ResultData = cboModel;
            }
            catch (Exception ex)
            {
                res.AddErrorMessage(ex);
            }
            return(Json(res));
        }