public Result <SettingVM> GetSetting()
        {
            var result = ConvertDataTableToList.BindList <GeneralSetting>(_dataSource.List());

            if (result.Count > 0 || result.Count == 0)
            {
                var setting = new SettingVM();
                setting.SiteUrl         = result.FirstOrDefault(x => x.Name.Equals("SiteUrl")).Value;
                setting.SiteName        = result.FirstOrDefault(x => x.Name.Equals("SiteName")).Value;
                setting.SiteKeyword     = result.FirstOrDefault(x => x.Name.Equals("SiteKeyword")).Value;
                setting.SiteDescription = result.FirstOrDefault(x => x.Name.Equals("SiteDescription")).Value;

                setting.Address          = result.FirstOrDefault(x => x.Name.Equals("Address")).Value;
                setting.CountShowArticle = result.FirstOrDefault(x => x.Name.Equals("CountShowArticle")).Value;
                setting.CountShowNews    = result.FirstOrDefault(x => x.Name.Equals("CountShowNews")).Value;
                setting.CountShowProduct = result.FirstOrDefault(x => x.Name.Equals("CountShowProduct")).Value;
                setting.CountShowEvents  = result.FirstOrDefault(x => x.Name.Equals("CountShowEvents")).Value;

                setting.CountShowSlider = result.FirstOrDefault(x => x.Name.Equals("CountShowSlider")).Value;
                setting.FacebookUrl     = result.FirstOrDefault(x => x.Name.Equals("FacebookUrl")).Value;
                setting.Fax             = result.FirstOrDefault(x => x.Name.Equals("Fax")).Value;
                setting.InstagramUrl    = result.FirstOrDefault(x => x.Name.Equals("InstagramUrl")).Value;

                setting.Mobile      = result.FirstOrDefault(x => x.Name.Equals("Mobile")).Value;
                setting.Phone       = result.FirstOrDefault(x => x.Name.Equals("Phone")).Value;
                setting.SiteMetaTag = result.FirstOrDefault(x => x.Name.Equals("SiteMetaTag")).Value;
                setting.TelegramUrl = result.FirstOrDefault(x => x.Name.Equals("TelegramUrl")).Value;

                setting.TwitterUrl  = result.FirstOrDefault(x => x.Name.Equals("TwitterUrl")).Value;
                setting.WhatsAppUrl = result.FirstOrDefault(x => x.Name.Equals("WhatsAppUrl")).Value;
                return(Result <SettingVM> .Successful(data : setting));
            }
            return(Result <SettingVM> .Failure());
        }
Exemplo n.º 2
0
        private List <MenuVM> ChildRender(List <Menu> child)
        {
            List <MenuVM> menus = new List <MenuVM>();

            if (child.Count > 0)
            {
                for (int i = 0; i < child.Count; i++)
                {
                    var subchild = ConvertDataTableToList.BindList <Menu>(_dataSource.GetChildren(child[i].Node));
                    if (subchild.Count > 0)
                    {
                        menus.Add(new MenuVM {
                            IconText = child[i].IconText, Url = child[i].Url, ID = child[i].ID, Name = child[i].Name, Children = ChildRender(subchild), Parameters = child[i].Parameters
                        });
                    }
                    else
                    {
                        menus.Add(new MenuVM {
                            IconText = child[i].IconText, Url = child[i].Url, ID = child[i].ID, Name = child[i].Name, Parameters = child[i].Parameters
                        });
                    }
                }
            }
            return(menus);
        }
Exemplo n.º 3
0
        public Result <List <MenuVM> > GetMenuForWeb(string Node)
        {
            try
            {
                List <MenuVM> menus = new List <MenuVM>();

                var children = ConvertDataTableToList.BindList <Menu>(_dataSource.GetChildren(Node));

                if (children.Count > 0)
                {
                    for (int i = 0; i < children.Count; i++)
                    {
                        var child = ConvertDataTableToList.BindList <Menu>(_dataSource.GetChildren(children[i].Node));
                        if (child.Count > 0)
                        {
                            menus.Add(new MenuVM {
                                IconText = children[i].IconText, Url = children[i].Url, ID = children[i].ID, Name = children[i].Name, Parameters = children[i].Parameters, Children = ChildRender(child)
                            });
                            //str += ChildRender(child, children[i].ID);
                        }

                        else
                        {
                            menus.Add(new MenuVM {
                                IconText = children[i].IconText, Url = children[i].Url, ID = children[i].ID, Parameters = children[i].Parameters, Name = children[i].Name, Children = null
                            });
                        }
                    }
                }
                return(Result <List <MenuVM> > .Successful(data : menus));
            }
            catch (Exception e) { return(Result <List <MenuVM> > .Failure()); }
        }
        /// <summary>
        /// 콤보박스 초기화 - 공통코드를 사용하지 않는 콤보박스를 설정한다.
        /// </summary>
        private async void InitComboBoxInfo()
        {
            #region ++ 공통코드 사용하지 않는 콤보박스 설정
            var strWrkPlanYmd = this.BaseClass.GetCalendarValue(this.deWrkPlanWmd);       // 출고일자
            // (공통코드 사용하지 않음)
            DataTable dtComboData = await Utility.HelperClass.GetSP_OPT_QPS_DATA_SET_LIST_INQ(strWrkPlanYmd);

            // 조회 데이터가 없는 경우 구문을 리턴한다.
            if (dtComboData.Rows.Count == 0)
            {
                this.cboDataSetID.ItemsSource = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboData);

                return;
            }

            // 콤보박스 설정을 위해 컬럼명을 변경한다.
            dtComboData = this.BaseClass.ModifyComboBoxColumnHeaderName(dtComboData);

            // DATA 그룹 데이터가 1개 컬럼으로 조회되기 때문에 콤보박스 설정을 위해 컬럼을 추가 생성한 후 데이터를 복사한다.
            dtComboData.Columns.Add("NAME", typeof(string));

            for (int i = 0; i < dtComboData.Rows.Count; i++)
            {
                dtComboData.Rows[i]["NAME"] = dtComboData.Rows[i]["CODE"].ToString();
            }

            this.cboDataSetID.ItemsSource = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboData);
            if (this.BaseClass.ComboBoxItemCount(this.cboDataSetID) > 0)
            {
                this.cboDataSetID.SelectedIndex = 0;
            }
            #endregion
        }
Exemplo n.º 5
0
        public Result <List <ShowProductOnHomePageListVM> > ListForWeb(ProductListVM listVM, int Count)
        {
            var table = ConvertDataTableToList.BindList <ShowProductOnHomePageListVM>(_dataSource.ListForWeb(listVM, Count));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <ShowProductOnHomePageListVM> > .Successful(data : table));
            }
            return(Result <List <ShowProductOnHomePageListVM> > .Failure());
        }
Exemplo n.º 6
0
        public Result <List <Category> > List()
        {
            var table = ConvertDataTableToList.BindList <Category>(_dataSource.List());

            if (table.Count > 0)
            {
                return(Result <List <Category> > .Successful(data : table));
            }
            return(Result <List <Category> > .Failure());
        }
Exemplo n.º 7
0
        public Result <List <EventsListVM> > List(int count)
        {
            var table = ConvertDataTableToList.BindList <EventsListVM>(_dataSource.List(count));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <EventsListVM> > .Successful(data : table));
            }
            return(Result <List <EventsListVM> > .Failure());
        }
        public Result <List <Department> > ListByNode(string Node)
        {
            var table = ConvertDataTableToList.BindList <Department>(_dataSource.ListByNode(Node));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <Department> > .Successful(data : table));
            }
            return(Result <List <Department> > .Failure());
        }
Exemplo n.º 9
0
        public Result <List <GetCountCategoryVM> > GetCountCategory()
        {
            var table = ConvertDataTableToList.BindList <GetCountCategoryVM>(_dataSource.GetCountCategory());

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <GetCountCategoryVM> > .Successful(data : table));
            }
            return(Result <List <GetCountCategoryVM> > .Failure());
        }
        public Result <List <Notification> > GetActiveNotification()
        {
            var table = ConvertDataTableToList.BindList <Notification>(_dataSource.GetActiveNotification());

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <Notification> > .Successful(data : table));
            }
            return(Result <List <Notification> > .Failure());
        }
Exemplo n.º 11
0
        public Result <List <FaqGroupListVM> > ListForWeb()
        {
            var table = ConvertDataTableToList.BindList <FaqGroupListVM>(_dataSource.ListForWeb());

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <FaqGroupListVM> > .Successful(data : table));
            }
            return(Result <List <FaqGroupListVM> > .Failure());
        }
        public Result <List <Attachment> > List(Guid ParentID)
        {
            var table = ConvertDataTableToList.BindList <Attachment>(_dataSource.List(ParentID));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <Attachment> > .Successful(data : table));
            }
            return(Result <List <Attachment> > .Failure());
        }
Exemplo n.º 13
0
        public Result <List <TagsSearchListVM> > SearchByName(string Name)
        {
            var table = ConvertDataTableToList.BindList <TagsSearchListVM>(_dataSource.SearchByName(Name.Trim()));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <TagsSearchListVM> > .Successful(data : table));
            }
            return(Result <List <TagsSearchListVM> > .Failure());
        }
Exemplo n.º 14
0
        public Result <List <Command> > ListForRole(CommandListVM model)
        {
            var table = ConvertDataTableToList.BindList <Command>(_dataSource.ListForRole(model));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <Command> > .Successful(data : table));
            }
            return(Result <List <Command> > .Failure());
        }
Exemplo n.º 15
0
        public Result <List <FAQ> > List(Guid FAQGroupID)
        {
            var table = ConvertDataTableToList.BindList <FAQ>(_dataSource.List(FAQGroupID));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <FAQ> > .Successful(data : table));
            }
            return(Result <List <FAQ> > .Failure());
        }
Exemplo n.º 16
0
        public Result <List <Position> > List(PositionListVM model)
        {
            var table = ConvertDataTableToList.BindList <Position>(_dataSource.List(model));

            if (table.Count > 0)
            {
                return(Result <List <Position> > .Successful(data : table));
            }
            return(Result <List <Position> > .Failure());
        }
Exemplo n.º 17
0
        public Result <List <Section> > List(SectionListVM listVM)
        {
            var table = ConvertDataTableToList.BindList <Section>(_dataSource.List(listVM));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <Section> > .Successful(data : table));
            }
            return(Result <List <Section> > .Failure());
        }
Exemplo n.º 18
0
        public Result <List <GetPermission> > GetPermission()
        {
            var table = ConvertDataTableToList.BindList <GetPermission>(_dataSource.GetPermission());

            if (table.Count > 0)
            {
                return(Result <List <GetPermission> > .Successful(data : table));
            }
            return(Result <List <GetPermission> > .Failure());
        }
Exemplo n.º 19
0
        /// <summary>
        /// 콤보박스 바인딩 (센터코드) - 공통 콤보박스 사용하지 않음
        /// </summary>
        private void BindingComboBoxCenter()
        {
            #region 중복 센터 정보를 필터링 하기 위해 GroupBy 처리한다.
            var query = from p in this.g_dtDatabaseConnectionInfo.AsEnumerable()
                        group p by new
            {
                CNTR_CD = p.Field <string>("CNTR_CD"),
                CNTR_NM = p.Field <string>("CNTR_NM"),
                DB_TYPE = p.Field <string>("DB_CONN_TYPE")
            } into q
            where q.Key.DB_TYPE.Equals(this.g_strConfigDBConnectType)
            select new
            {
                CODE         = q.Key.CNTR_CD,
                NAME         = q.Key.CNTR_NM,
                DB_CONN_TYPE = q.Key.DB_TYPE
            };
            #endregion

            // 콤보박스 바인딩을 위해 데이터를 저장하기 위한 데이터테이블
            DataTable dtNewTable = null;
            // 데이터테이블 스키마를 정의한다. (공통코드 형식)
            dtNewTable = this.BaseClass.CreateDataTableSchema(dtNewTable, BaseEnumClass.CreateTableSchemaKind.COMMON_CODE);

            // GroupBy 처리한 데이터를 데이터 테이블에 저장한다.
            foreach (var itemCenterInfo in query)
            {
                var aaa = itemCenterInfo.CODE;
                var bbb = itemCenterInfo.NAME;

                DataRow drNewRow = dtNewTable.NewRow();
                drNewRow["CODE"] = itemCenterInfo.CODE;
                drNewRow["NAME"] = itemCenterInfo.NAME;
                dtNewTable.Rows.Add(drNewRow);
            }

            // 데이터테이블에 저장한 센터정보를 콤보박스 바인딩을 위해 List형식으로 저장한다.
            var liComboBoxInfo = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtNewTable);
            // 센터 정보를 콤보박스에 바인딩한다.
            this.cboCenter.ItemsSource = liComboBoxInfo;

            // 바인딩 데이터가 있는 경우 첫번째 Row를 선택하도록 한다.
            if (liComboBoxInfo.Count > 0)
            {
                if (this.BaseClass.LoginCenterCD.Length > 0)
                {
                    this.cboCenter.SelectedIndex = this.BaseClass.MatchComboIndex(this.cboCenter, this.BaseClass.LoginCenterCD);
                }
                else
                {
                    this.cboCenter.SelectedIndex = 0;
                }
            }
        }
Exemplo n.º 20
0
        public Result <List <ShowProductOnHomePageListVM> > ListBySellingProductType(SellingProductType type, int?count)
        {
            count = count ?? 4;
            var table = ConvertDataTableToList.BindList <ShowProductOnHomePageListVM>(_dataSource.ListBySellingProductType(type, count.Value));

            if (table.Count > 0 || table.Count == 0)
            {
                return(Result <List <ShowProductOnHomePageListVM> > .Successful(data : table));
            }
            return(Result <List <ShowProductOnHomePageListVM> > .Failure());
        }
Exemplo n.º 21
0
        //public CommonCodeExtensions(CodeType codeType, bool isAlltypeCodeAdd)
        //{
        //    this.IsAllTypeCodeAdd = isAlltypeCodeAdd;
        //    this.CommonCodeType = codeType;
        //    GetList();
        //}

        //public CommonCodeExtensions(CodeType codeType, bool isAlltypeCodeAdd, string callType)
        //{
        //    this.IsAllTypeCodeAdd = isAlltypeCodeAdd;
        //    this.CommonCodeType = codeType;

        //    GetList(callType, String.Empty, string.Empty, string.Empty, string.Empty);

        //    /*
        //    using (BaseClass baseclass = new BaseClass())
        //    {
        //        this.AddRange(baseclass.GetComboBoxListItem(
        //                                   callType
        //                                 , attr1
        //                                 , attr2
        //                                 , attr3
        //                                 , IsAllTypeCodeAdd
        //                                 , "ALL"
        //                                 , (Application.Current as BaseApp).BASE_INFO.country_cd
        //                                 , _CenterCd
        //                             ));
        //    }
        //    */
        //}

        //public CommonCodeExtensions(CodeType codeType, bool isAlltypeCodeAdd, string callType, string attr1, string attr2, string attr3, string attr4)
        //{
        //    this.IsAllTypeCodeAdd = isAlltypeCodeAdd;
        //    this.CommonCodeType = codeType;

        //    GetList(callType, attr1, attr2, attr3, attr4);

        //    /*
        //    using (BaseClass baseclass = new BaseClass())
        //    {
        //        this.AddRange(baseclass.GetComboBoxListItem(
        //                                   callType
        //                                 , attr1
        //                                 , attr2
        //                                 , attr3
        //                                 , IsAllTypeCodeAdd
        //                                 , "ALL"
        //                                 , (Application.Current as BaseApp).BASE_INFO.country_cd
        //                                 , _CenterCd
        //                             ));
        //    }
        //    */
        //}

        #region CommonCodeExtensions - XAML단 공통코드 설정 - 파라메터에 공통코드만 있는 경우
        /// <summary>
        /// XAML단 공통코드 설정 - 파라메터에 공통코드만 있는 경우
        /// </summary>
        /// <param name="_strCommonCode"></param>
        public CommonCodeExtensions(string _strCommonCode)
        {
            if (_strCommonCode.Length > 0)
            {
                var dtComboBoxInfo = SMART.WCS.Common.Control.CommonComboBox.GetFirstCommonData(_strCommonCode);

                if (dtComboBoxInfo != null && dtComboBoxInfo.Rows.Count > 0)
                {
                    this.AddRange(ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboBoxInfo));
                }
            }
        }
Exemplo n.º 22
0
        public CommonCodeExtensions(string _strCommonCode, string[] _arrComboBoxInputParam, bool _isfirstRowEmpty)
        {
            if (_strCommonCode.Length > 0)
            {
                var dtComboBoxInfo = SMART.WCS.Common.Control.CommonComboBox.GetCommonData(_strCommonCode, _arrComboBoxInputParam, _isfirstRowEmpty);

                if (dtComboBoxInfo != null && dtComboBoxInfo.Rows.Count > 0)
                {
                    this.AddRange(ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboBoxInfo));
                }
            }
        }
Exemplo n.º 23
0
        public Result <List <CommentForProductAdminListVM> > List(CommentForType commentForType)
        {
            var model = ConvertDataTableToList.BindList <CommentForProductAdminListVM>(_dataSource.List(commentForType));

            if (model.Count > 0 || model.Count == 0)
            {
                return(Result <List <CommentForProductAdminListVM> > .Successful(data : model));
            }
            else
            {
                return(Result <List <CommentForProductAdminListVM> > .Failure());
            }
        }
Exemplo n.º 24
0
        public Result <List <Pages> > List()
        {
            var result = ConvertDataTableToList.BindList <Pages>(_dataSource.List());

            if (result.Count > 0 || result.Count == 0)
            {
                return(Result <List <Pages> > .Successful(data : result));
            }
            else
            {
                return(Result <List <Pages> > .Failure());
            }
        }
Exemplo n.º 25
0
        /// <summary>
        /// 콤보박스 바인딩 (센터코드)
        /// </summary>
        private void BindingComboBoxLangInfo()
        {
            try
            {
                DataTable dtCommonData = CommonComboBox.GetFirstCommonData("LANG");

                var liComboBoxInfo = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtCommonData);
                this.cboLang.ItemsSource = liComboBoxInfo;

                if (dtCommonData.Rows.Count > 0)
                {
                    this.cboLang.SelectedIndex = 0;
                }
            }
            catch { throw; }
        }
Exemplo n.º 26
0
        /// <summary>
        /// Data Set 콤보박스 변경 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CboOptCD_SelectedIndexChanged(object sender, RoutedEventArgs e)
        {
            Init_InputData();
            if (cboOptCD.SelectedIndex == 0)
            {   //콤보박스 선택이 표준일 경우 날짜와 DataSetID는 비활성화, 저장버튼 활성화, DataSetID STANDARD로 고정
                DataTable dtComboData = new DataTable();
                dtComboData.Columns.Add("CODE", typeof(string));
                dtComboData.Columns.Add("NAME", typeof(string));
                DataRow drComboData = dtComboData.NewRow();

                drComboData["CODE"] = "STANDARD";
                drComboData["NAME"] = "STANDARD";

                dtComboData.Rows.Add(drComboData);
                this.cboDataSetID.ItemsSource   = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboData);
                this.cboDataSetID.SelectedIndex = 0;

                this.deWrkPlanWmd.IsEnabled     = false;
                this.cboDataSetID.IsEnabled     = false;
                this.btnSave.IsEnabled          = true;
                this.txtBtchDivLim.IsEnabled    = true;
                this.cboLocBal.IsEnabled        = true;
                this.cboSortMode.IsEnabled      = true;
                this.txtSupBtchDivCnt.IsEnabled = true;
                this.txtMinSupSkuUnit.IsEnabled = true;
                this.cboLocBtchInfo.IsEnabled   = true;
                this.cboSkuCelType.IsEnabled    = true;
            }
            else
            {   //콤보박스 선택이 표준이 아닐 경우 날짜 선택/DataSetID콤보박스 활성화, 저장버튼 비활성화
                //날짜 변경 시 이벤트 추가 및 실행
                this.deWrkPlanWmd.IsEnabled    = true;
                this.cboDataSetID.IsEnabled    = true;
                this.btnSave.IsEnabled         = false;
                deWrkPlanWmd.EditValueChanged += DeWrkPlanWmd_EditValueChanged;
                DeWrkPlanWmd_EditValueChanged(null, null);

                this.txtBtchDivLim.IsEnabled    = false;
                this.cboLocBal.IsEnabled        = false;
                this.cboSortMode.IsEnabled      = false;
                this.txtSupBtchDivCnt.IsEnabled = false;
                this.txtMinSupSkuUnit.IsEnabled = false;
                this.cboLocBtchInfo.IsEnabled   = false;
                this.cboSkuCelType.IsEnabled    = false;
            }
        }
Exemplo n.º 27
0
        /// <summary>
        /// Data Set 콤보박스 변경 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void CboDataSetID_SelectedIndexChanged(object sender, RoutedEventArgs e)
        {
            var       strWrkPlanYmd  = this.BaseClass.GetCalendarValue(this.deWrkPlanWmd);          // 출고일자
            var       iSelectedValue = this.BaseClass.ComboBoxSelectedKeyValue(this.cboDataSetID);  // 데이터 그룹 선택값
            DataTable dtComboData    = await Utility.HelperClass.GetSP_OPT_QPS_ROC_SEQ_LIST_INQ(strWrkPlanYmd, iSelectedValue);

            // 조회 데이터가 없는 경우 구문을 리턴한다.
            if (dtComboData.Rows.Count == 0)
            {
                this.cboRocOptSeq.ItemsSource = null;
                return;
            }

            dtComboData = this.BaseClass.ModifyComboBoxColumnHeaderName(dtComboData);
            this.cboRocOptSeq.ItemsSource   = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboData);
            this.cboRocOptSeq.SelectedIndex = 0;
        }
Exemplo n.º 28
0
        public Result <List <Comment> > List(Guid ParentID, Guid DocumentID)
        {
            var model = ConvertDataTableToList.BindList <Comment>(_dataSource.List(ParentID, DocumentID));

            if (model.Count > 0)
            {
                for (int i = 0; i < model.Count; i++)
                {
                    var list = List(model[i].ID, model[i].DocumentID);
                    model[i].Children = list.Data;
                }
                return(Result <List <Comment> > .Successful(data : model));
            }
            else
            {
                return(Result <List <Comment> > .Failure());
            }
        }
Exemplo n.º 29
0
        /// <summary>
        /// ROC 최적화 차수 콤보박스 변경 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void CboRocOptSeq_SelectedIndexChanged(object sender, RoutedEventArgs e)
        {
            var       strWrkPlanYmd        = this.BaseClass.GetCalendarValue(this.deWrkPlanWmd);                          // 출고일자
            var       strSelectedDataSetID = this.BaseClass.ComboBoxSelectedKeyValue(this.cboDataSetID);                  // 데이터 그룹 ID
            var       iRocOptSeq           = Convert.ToInt32(this.BaseClass.ComboBoxSelectedKeyValue(this.cboRocOptSeq)); // ROC 최적화 코드
            DataTable dtComboData          = await Utility.HelperClass.GetSP_OPT_QPS_CELL_OPT_LIST_INQ(strWrkPlanYmd, strSelectedDataSetID, "CELL_SIMUL", iRocOptSeq);

            // 조회 데이터가 없는 경우 구문을 리턴한다.
            if (dtComboData.Rows.Count == 0)
            {
                this.cboCellOptSeq.ItemsSource = null;
                return;
            }

            dtComboData = this.BaseClass.ModifyComboBoxColumnHeaderName(dtComboData);
            this.cboCellOptSeq.ItemsSource   = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboData);
            this.cboCellOptSeq.SelectedIndex = 0;
        }
Exemplo n.º 30
0
        /// <summary>
        /// 콤보박스 초기화 - 공통코드를 사용하지 않는 콤보박스를 설정한다.
        /// </summary>
        private async void InitComboBoxInfo()
        {
            #region ++ 공통코드 사용하지 않는 콤보박스 설정
            var strWrkPlanYmd = this.BaseClass.GetCalendarValue(this.deWrkPlanWmd);         // 출고일자

            // (공통코드 사용하지 않음)
            DataTable dtComboData = await Utility.HelperClass.GetSP_OPT_QPS_DATA_SET_LIST_INQ(strWrkPlanYmd);

            // 조회 데이터가 없는 경우 구문을 리턴한다.
            if (dtComboData.Rows.Count == 0)
            {
                // DATA 그룹 데이터가 없는 경우 (콤보박스 설정이 안되는 경우) 셀 시뮬레이션 버튼을 비활성화한다.
                this.BaseClass.SetSimpleButtonIsEnabled(this.btnCellOpti, false);
                this.cboDataSetID.ItemsSource  = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboData);
                this.cboRocOptSeq.ItemsSource  = null;
                this.cboCellOptSeq.ItemsSource = null;

                return;
            }

            // 콤보박스 설정을 위해 컬럼명을 변경한다.
            dtComboData = this.BaseClass.ModifyComboBoxColumnHeaderName(dtComboData);

            // DATA 그룹 데이터가 1개 컬럼으로 조회되기 때문에 콤보박스 설정을 위해 컬럼을 추가 생성한 후 데이터를 복사한다.
            dtComboData.Columns.Add("NAME", typeof(string));

            foreach (DataRow drRow in dtComboData.Rows)
            {
                drRow["NAME"] = drRow["CODE"];
            }

            this.cboDataSetID.ItemsSource = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtComboData);

            this.cboDataSetID.SelectedIndexChanged -= CboDataSetID_SelectedIndexChanged;
            this.cboDataSetID.SelectedIndex         = 0;
            this.cboDataSetID.SelectedIndexChanged += CboDataSetID_SelectedIndexChanged;

            // DATA 그룹 데이터가 있는 경우 (콤보박스 설정이 된 경우) ROC 수행 버튼을 활성화한다.
            this.BaseClass.SetSimpleButtonIsEnabled(this.btnCellOpti, true);

            this.CboDataSetID_SelectedIndexChanged(null, null);
            #endregion
        }