Exemple #1
0
        /// <summary>
        /// Generate xml for unpaid billing detail list of specific invoice no. of screen session
        /// </summary>
        /// <returns></returns>
        public ActionResult ICS083_GetDetailGrid()
        {
            List <doUnpaidBillingDetail> doUnpaidDetail = new List <doUnpaidBillingDetail>();
            ObjectResultData             res            = new ObjectResultData();

            res.MessageType = MessageModel.MESSAGE_TYPE.WARNING;
            try
            {
                //Get Unpaid billing detail
                IIncomeHandler handler = ServiceContainer.GetService <IIncomeHandler>() as IIncomeHandler;
                if (ICS083_ScreenData != null)
                {
                    if (string.IsNullOrEmpty(ICS083_ScreenData.InvoiceNo))
                    {
                        doUnpaidDetail = handler.GetUnpaidBillingDetailByBillingTarget(ICS083_ScreenData.BillingTargetCode);
                    }
                    else
                    {
                        doUnpaidDetail = handler.GetUnpaidBillingDetailByInvoice(ICS083_ScreenData.InvoiceNo, ICS083_ScreenData.InvoiceOCC);
                    }
                }
            }
            catch (Exception ex)
            {
                res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION;
                res.AddErrorMessage(ex);
                return(Json(res));
            }
            res.ResultData = CommonUtil.ConvertToXml <doUnpaidBillingDetail>(doUnpaidDetail, "Income\\ICS083", CommonUtil.GRID_EMPTY_TYPE.SEARCH);
            return(Json(res));
        }