private void RefreshLocationList() { CB_LOCATION.Items.Clear(); LT_USERLIST.Items.Clear(); CB_DATA_LOCATION.Items.Clear(); m_dtLocation = m_DBHandler.ExcuteQuery("SELECT * FROM LOCATION"); DGV_LOACTION.DataSource = m_dtLocation; foreach (DataRow dr in m_dtLocation.Rows) { MKItem item = new MKItem(); item.Show = string.Format("{0},{1},{2},{3},{4}", dr[1].ToString(), dr[2].ToString(), dr[3].ToString(), dr[4].ToString(), dr[5].ToString()); item.Hide = dr[0].ToString(); CB_LOCATION.Items.Add(item); CB_DATA_LOCATION.Items.Add(item); } }
private void RefreshUserList() { LT_USERLIST.Items.Clear(); CB_USER.Items.Clear(); CB_DATA_USER.Items.Clear(); DataTable dt = m_DBHandler.ExcuteQuery("SELECT U_ID, U_NAME FROM USER WHERE ENABLE = 1"); foreach (DataRow dr in dt.Rows) { MKItem item = new MKItem(); item.Show = dr[1].ToString(); item.Hide = dr[0].ToString(); CB_USER.Items.Add(item); CB_DATA_USER.Items.Add(item); LT_USERLIST.Items.Add(dr[1]); } }