Пример #1
0
        /// <summary>
        /// Getting sub contractor
        /// </summary>
        /// <param name="MaintenanceNo"></param>
        /// <returns></returns>
        public ActionResult CMS180_SubcontractorGrid(string MaintenanceNo)
        {
            ObjectResultData res = new ObjectResultData();
            List <dtInstallationPOManagementForView> lst = new List <dtInstallationPOManagementForView>();

            try
            {
                IInstallationHandler hand = ServiceContainer.GetService <IInstallationHandler>() as IInstallationHandler;
                lst = hand.GetTbt_InstallationPOManagementForView(MaintenanceNo);
                var sortedList = from p in lst
                                 orderby p.SubcontractorCode
                                 select p;

                lst            = sortedList.ToList <dtInstallationPOManagementForView>();
                res.ResultData = CommonUtil.ConvertToXml <dtInstallationPOManagementForView>(lst, "Common\\CMS180_SubContractor", CommonUtil.GRID_EMPTY_TYPE.SEARCH);
            }
            catch (Exception ex)
            {
                res.AddErrorMessage(ex);
            }
            return(Json(res));
        }