/// <summary> /// Getting billing type detail list for load to grid /// </summary> /// <param name="BillingOCC"></param> /// <returns></returns> public ActionResult CMS420_LoadGridBillingTypeDetail(string BillingOCC) { ObjectResultData res = new ObjectResultData(); try { CMS420_ScreenParameter param = GetScreenObject <CMS420_ScreenParameter>(); CommonUtil cm = new CommonUtil(); string strContractCode_short = param.ContractCode; string strContractCode = cm.ConvertContractCode(strContractCode_short, CommonUtil.CONVERT_TYPE.TO_LONG); IBillingHandler billingHandler = ServiceContainer.GetService <IBillingHandler>() as IBillingHandler; List <doBillingTypeDetailList> billingTypeDetailListData = billingHandler.GetBillingTypeDetailList(strContractCode, BillingOCC); CommonUtil.MappingObjectLanguage <doBillingTypeDetailList>(billingTypeDetailListData); if (billingTypeDetailListData == null) { billingTypeDetailListData = new List <doBillingTypeDetailList>(); } string xml = CommonUtil.ConvertToXml <doBillingTypeDetailList>(billingTypeDetailListData, "Common\\CMS420_BillingTypeDetail", CommonUtil.GRID_EMPTY_TYPE.SEARCH); res.ResultData = xml; return(Json(res)); } catch (Exception ex) { res.AddErrorMessage(ex); return(Json(res)); } }
/// <summary> /// Getting billing type detail list for load to grid with initial /// </summary> /// <returns></returns> public ActionResult CMS420_LoadGridBillingTypeDetailWithInitial() { ObjectResultData res = new ObjectResultData(); try { CMS420_ScreenParameter param = GetScreenObject <CMS420_ScreenParameter>(); CommonUtil cm = new CommonUtil(); string strContractCode_short = param.ContractCode; string strContractCode = cm.ConvertContractCode(strContractCode_short, CommonUtil.CONVERT_TYPE.TO_LONG); IBillingHandler billingHandler = ServiceContainer.GetService <IBillingHandler>() as IBillingHandler; ICommonHandler comHand = ServiceContainer.GetService <ICommonHandler>() as ICommonHandler; List <doMiscTypeCode> tmpCurrencies = comHand.GetMiscTypeCodeList(new List <doMiscTypeCode>() { new doMiscTypeCode() { FieldName = MiscType.C_CURRENCT, ValueCode = "%" } }).ToList(); List <doBillingTypeDetailList> billingTypeDetailListData = billingHandler.GetBillingTypeDetailList(strContractCode, param.BillingOCC); CommonUtil.MappingObjectLanguage <doBillingTypeDetailList>(billingTypeDetailListData); if (billingTypeDetailListData == null) { billingTypeDetailListData = new List <doBillingTypeDetailList>(); } string xml = CommonUtil.ConvertToXml <doBillingTypeDetailList>(billingTypeDetailListData, "Common\\CMS420_BillingTypeDetail", CommonUtil.GRID_EMPTY_TYPE.SEARCH); res.ResultData = xml; return(Json(res)); } catch (Exception ex) { res.AddErrorMessage(ex); return(Json(res)); } }