예제 #1
0
        /// <summary>
        /// Business Line List
        /// </summary>
        /// <returns>
        /// It returns complete Business Line List
        /// </returns>
        /// <written by>
        /// Faizan Ahmad
        /// </written>
        public JsonResult GetBusinessLineList()
        {
            DropDownResponse dropDownResponse = new DropDownResponse();

            try
            {
                dropDownResponse.List = _businessLineServices.BusinessLineTable().Where(x => !string.IsNullOrEmpty(x.Name)).Select(x => new DropDownValues {
                    Id = x.Id, Value = x.Name
                }).ToList();
                dropDownResponse.IsSuccess = true;
            }
            catch (Exception ex)
            {
                dropDownResponse.IsSuccess = false;
                dropDownResponse.Message   = ex.Message;
            }
            return(Json(dropDownResponse, JsonRequestBehavior.AllowGet));
        }