Beispiel #1
0
        /// <summary>
        /// Generate subcontractor combobox
        /// </summary>
        /// <param name="helper"></param>
        /// <param name="id"></param>
        /// <param name="firstElement"></param>
        /// <param name="attribute"></param>
        /// <returns></returns>
        public static MvcHtmlString SubContractorComboBoxWithFirstElement(this HtmlHelper helper, string id, string firstElement, object attribute = null)
        {
            ICommonContractHandler   hand = ServiceContainer.GetService <ICommonContractHandler>() as ICommonContractHandler;
            List <tbm_SubContractor> lst  = hand.GetTbm_SubContractorData(null);

            //MvcHtmlString mvc = CommonUtil.CommonComboBox<tbm_SubContractor>(id, lst, "SubContractorCodeName", "SubContractorCode", attribute);
            return(CommonUtil.CommonComboBoxWithCustomFirstElement <tbm_SubContractor>(id, lst, "SubContractorCodeName", "SubContractorCode", firstElement, attribute));
        }
Beispiel #2
0
        //Add by Nutnicha C. 01/09/2011
        /// <summary>
        /// Generate subcontractor combobox
        /// </summary>
        /// <param name="helper"></param>
        /// <param name="id"></param>
        /// <param name="attribute"></param>
        /// <returns></returns>
        public static MvcHtmlString SubContractorComboBox(this HtmlHelper helper, string id, object attribute = null)
        {
            ICommonContractHandler   hand = ServiceContainer.GetService <ICommonContractHandler>() as ICommonContractHandler;
            List <tbm_SubContractor> lst  = hand.GetTbm_SubContractorData(null);
            MvcHtmlString            mvc  = CommonUtil.CommonComboBox <tbm_SubContractor>(id, lst, "SubContractorCodeName", "SubContractorCode", attribute);

            return(mvc);
        }