Пример #1
0
        /// <summary>
        /// Check screen authority and permission
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public ActionResult QUS012_Authority(QUS012_ScreenParameter param)
        {
            ObjectResultData res = new ObjectResultData();

            try
            {
                CommonUtil cmm = new CommonUtil();
                param.Condition.QuotationTargetCode =
                    cmm.ConvertQuotationTargetCode(param.Condition.QuotationTargetCode, CommonUtil.CONVERT_TYPE.TO_LONG);

                IQuotationHandler handler = ServiceContainer.GetService <IQuotationHandler>() as IQuotationHandler;
                param.doRentalQuotationData = handler.GetRentalQuotationData(param.Condition);

                if (param.doRentalQuotationData != null && param.doRentalQuotationData.dtTbt_QuotationBasic != null)
                {
                    param.doQuotationInstallationDetail = handler.GetTbt_QuotationInstallationDetail(
                        param.doRentalQuotationData.dtTbt_QuotationBasic.QuotationTargetCode,
                        param.doRentalQuotationData.dtTbt_QuotationBasic.Alphabet
                        ).FirstOrDefault();
                }
            }
            catch (Exception ex)
            {
                res.AddErrorMessage(ex);
            }

            return(InitialScreenEnvironment <QUS012_ScreenParameter>(QUS012_SCREEN_NAME, param, res));
        }
Пример #2
0
        /// <summary>
        /// Generate the quotation detail for alarm section
        /// </summary>
        /// <returns></returns>
        public ActionResult QUS012_02()
        {
            if (PrepareDetailData(MODE_TYPE.AL) == false)
            {
                return(Json(""));
            }

            doRentalQuotationData rqData = QUS012_RentalQuotationDataSession;

            if (rqData == null)
            {
                return(Json(""));
            }

            ViewBag.HideDispathType = false;
            if (rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_RENTAL_SALE)
            {
                ViewBag.HideDispathType = true;
            }

            QUS012_ScreenParameter param = GetScreenObject <QUS012_ScreenParameter>();

            if (param != null && param.doQuotationInstallationDetail != null)
            {
                ViewBag.chkCeilingTypeTBar         = param.doQuotationInstallationDetail.CeilingTypeTBar;
                ViewBag.chkCeilingTypeSlabConcrete = param.doQuotationInstallationDetail.CeilingTypeSlabConcrete;
                ViewBag.chkCeilingTypeMBar         = param.doQuotationInstallationDetail.CeilingTypeMBar;
                ViewBag.chkCeilingTypeSteel        = param.doQuotationInstallationDetail.CeilingTypeSteel;
                ViewBag.chkCeilingTypeNone         = !(
                    (param.doQuotationInstallationDetail.CeilingTypeTBar ?? false) ||
                    (param.doQuotationInstallationDetail.CeilingTypeSlabConcrete ?? false) ||
                    (param.doQuotationInstallationDetail.CeilingTypeMBar ?? false) ||
                    (param.doQuotationInstallationDetail.CeilingTypeSteel ?? false)
                    );
                ViewBag.txtCeilingHeight       = param.doQuotationInstallationDetail.CeilingHeight;
                ViewBag.chkSpecialInsPVC       = param.doQuotationInstallationDetail.SpecialInsPVC;
                ViewBag.chkSpecialInsSLN       = param.doQuotationInstallationDetail.SpecialInsSLN;
                ViewBag.chkSpecialInsProtector = param.doQuotationInstallationDetail.SpecialInsProtector;
                ViewBag.chkSpecialInsEMT       = param.doQuotationInstallationDetail.SpecialInsEMT;
                ViewBag.chkSpecialInsPE        = param.doQuotationInstallationDetail.SpecialInsPE;
                ViewBag.chkSpecialInsOther     = param.doQuotationInstallationDetail.SpecialInsOther;
                ViewBag.txtSpecialInsOther     = param.doQuotationInstallationDetail.SpecialInsOtherText;
            }

            return(View("QUS012/_QUS012_02"));
        }
Пример #3
0
        public ActionResult QUS012()
        {
            ViewBag.HideQuotationTarget            = true;
            ViewBag.HideQuotationDetailInfo_AL     = true;
            ViewBag.HideQuotationDetailInfo_ONLINE = true;
            ViewBag.HideQuotationDetailInfo_OTHER  = true;
            ViewBag.HideMaintenanceDetail          = true;
            ViewBag.HideInstrumentDetail_ALB       = true;
            ViewBag.HideInstrumentDetail_ALA       = true;
            ViewBag.HideInstrumentDetail_ONLINE    = true;
            ViewBag.HideFacilityDetail             = true;
            ViewBag.HideBeatGuardDetail            = true;
            ViewBag.HideSentryGuardDetail          = true;

            try
            {
                QUS012_ScreenParameter param = GetScreenObject <QUS012_ScreenParameter>();
                if (param != null)
                {
                    ViewBag.HideQuotationTarget = param.HideQuotationTarget;
                }

                doRentalQuotationData rqData = QUS012_RentalQuotationDataSession;
                if (rqData == null)
                {
                    return(Json(""));
                }

                if (rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_AL ||
                    rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_RENTAL_SALE)
                {
                    if (rqData.doQuotationHeaderData.doQuotationTarget.TargetCodeTypeCode == SECOM_AJIS.Common.Util.ConstantValue.TargetCodeType.C_TARGET_CODE_TYPE_QTN_CODE ||
                        (rqData.doQuotationHeaderData.doQuotationTarget.TargetCodeTypeCode == SECOM_AJIS.Common.Util.ConstantValue.TargetCodeType.C_TARGET_CODE_TYPE_CONTRACT_CODE &&
                         rqData.FirstInstallCompleteFlag == false))
                    {
                        ViewBag.HideQuotationDetailInfo_AL = false;
                        ViewBag.HideInstrumentDetail_ALB   = false;
                        ViewBag.HideFacilityDetail         = false;
                    }
                    else if (rqData.doQuotationHeaderData.doQuotationTarget.TargetCodeTypeCode == SECOM_AJIS.Common.Util.ConstantValue.TargetCodeType.C_TARGET_CODE_TYPE_CONTRACT_CODE &&
                             rqData.FirstInstallCompleteFlag == true)
                    {
                        ViewBag.HideQuotationDetailInfo_AL = false;
                        ViewBag.HideInstrumentDetail_ALA   = false;
                        ViewBag.HideFacilityDetail         = false;
                    }
                }
                else if (rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_SALE ||
                         rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_ONLINE)
                {
                    ViewBag.HideQuotationDetailInfo_ONLINE = false;
                    ViewBag.HideInstrumentDetail_ONLINE    = false;
                    ViewBag.HideFacilityDetail             = false;
                }
                else if (rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_BE)
                {
                    ViewBag.HideQuotationDetailInfo_OTHER = false;
                    ViewBag.HideBeatGuardDetail           = false;
                }
                else if (rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_SG)
                {
                    ViewBag.HideQuotationDetailInfo_OTHER = false;
                    ViewBag.HideSentryGuardDetail         = false;
                }
                else if (rqData.doQuotationHeaderData.doQuotationTarget.ProductTypeCode == SECOM_AJIS.Common.Util.ConstantValue.ProductType.C_PROD_TYPE_MA)
                {
                    ViewBag.HideQuotationDetailInfo_OTHER = false;
                    ViewBag.HideMaintenanceDetail         = false;
                }
            }
            catch
            {
            }

            return(View());
        }