/// <summary>
        /// Search carry over and profit data.
        /// </summary>
        /// <param name="param">DO of searchig parameter.</param>
        /// <returns>Return ActionResult of JSON data for carry over and profit grid.</returns>
        public ActionResult CMS480_SearchManageCarryOverProfit(doGetManageCarryOverProfitCriteria param)
        {
            ObjectResultData res = new ObjectResultData();

            res.MessageType = MessageModel.MESSAGE_TYPE.WARNING;

            try
            {
                if (ModelState.IsValid == false)
                {
                    res.ResultData = false;
                    ValidatorUtil.BuildErrorMessage(res, this);
                    if (res.IsError)
                    {
                        return(Json(res));
                    }
                }
                else
                {
                    CommonUtil     com     = new CommonUtil();
                    ICommonHandler service = ServiceContainer.GetService <ICommonHandler>() as ICommonHandler;
                    var            lst     = service.GetManageCarryOverProfitForEdit(param.ReportYear, param.ReportMonth, param.ProductType, com.ConvertContractCode(param.ContractCode, CommonUtil.CONVERT_TYPE.TO_LONG), param.BillingOCC);

                    //res.ResultData = CommonUtil.ConvertToXml<doResultManageCarryOverProfitForEdit>(lst, "Common\\CMS480_CarryOverProfit", CommonUtil.GRID_EMPTY_TYPE.SEARCH);
                    res.ResultData = CMS480_SearchManageCarryOverProfit_CreateResult(true, lst);
                }

                //List<string> requiredField = new List<string>();

                //if (string.IsNullOrEmpty(param.ProductType))
                //    requiredField.Add("Product Type");

                //if (string.IsNullOrEmpty(param.ReportMonth))
                //    requiredField.Add("Month");

                //if (string.IsNullOrEmpty(param.ReportYear))
                //    requiredField.Add("Year");


                //if (requiredField.Count == 0)
                //{
                //    CommonUtil com = new CommonUtil();
                //    ICommonHandler service = ServiceContainer.GetService<ICommonHandler>() as ICommonHandler;
                //    var lst = service.GetManageCarryOverProfitForEdit(param.ReportYear, param.ReportMonth, param.ProductType, com.ConvertContractCode(param.ContractCode, CommonUtil.CONVERT_TYPE.TO_LONG), param.BillingOCC);

                //    //res.ResultData = CommonUtil.ConvertToXml<doResultManageCarryOverProfitForEdit>(lst, "Common\\CMS480_CarryOverProfit", CommonUtil.GRID_EMPTY_TYPE.SEARCH);
                //    res.ResultData = CMS480_SearchManageCarryOverProfit_CreateResult(true, lst);
                //}
                //else
                //{
                //    res.MessageType = MessageModel.MESSAGE_TYPE.WARNING;
                //    res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0007, new string[] { string.Join(", ", requiredField) });
                //    res.ResultData = this.CMS480_UpdateManageCarryOverProfit_CreateResult(false);
                //    return Json(res);
                //}
            }
            catch (Exception ex)
            {
                res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION;
                res.AddErrorMessage(ex);
                res.ResultData = CMS480_SearchManageCarryOverProfit_CreateResult(false, null);
                //res.ResultData = new
                //{
                //    Xml = "",
                //    ResultData = CMS480_SearchManageCarryOverProfit_CreateResult(false, null)
                //};
            }

            return(Json(res));
        }