Exemplo n.º 1
0
        /// <summary>
        /// Getting installaiton for CSV
        /// </summary>
        /// <returns></returns>
        public ActionResult CMS180_GetInstallationForCSV()
        {
            CMS180_ScreenParameter sParam = GetScreenObject <CMS180_ScreenParameter>();
            CommonUtil             cm     = new CommonUtil();
            ObjectResultData       res    = new ObjectResultData();
            List <dtInstallation>  lst    = new List <dtInstallation>();

            try
            {
                IInstallationHandler          handler = ServiceContainer.GetService <IInstallationHandler>() as IInstallationHandler;
                doSearchInstallationCondition cond    = new doSearchInstallationCondition();
                cond.slipNoNullFlag = true;
                lst = handler.GetInstallationDataListForCsvFile(cond);

                List <CMS180_SearchResultGridData> resultGridData = CommonUtil.ClonsObjectList <dtInstallation, CMS180_SearchResultGridData>(lst);
                if (resultGridData.Count <= 0)
                {
                    res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0001);
                    return(Json(res));
                }
                else
                {
                    res.ResultData         = resultGridData;
                    sParam.doResultCSVData = resultGridData; //Add by Jutarat A. on 25062013
                }
            }
            catch (Exception ex)
            {
                res.AddErrorMessage(ex);
            }
            return(Json(res));
        }