예제 #1
0
        public void refreshModels(string modelOfWhat)
        {
            this.ModelList.Rows.Clear();
            List <object>[] rs;
            string[]        columns = { "strModeCode", "strModeName" };
            rs = dbConnect.Select("Select * from tblModel where strModeItemCode = '" + modelOfWhat + "' and boolModeIsDel = false;", columns);

            for (int i = 0; i < rs[0].Count; i++)
            {
                //                             model code(hidden)           model name
                this.ModelList.Rows.Add(rs[0].ElementAt(i).ToString(), rs[1].ElementAt(i).ToString());
            }

            //clear selection
            ModelList.ClearSelection();
        }