public void GenComboBox_Quy(ref RadComboBox comboBox, string maChon = null) { try { for (int quy = 1; quy <= 4; quy++) { AutoCompleteEntry auto = new AutoCompleteEntry(quy.ToString(), quy.ToString(), quy.ToString()); comboBox.Items.Add(auto); } if (maChon.IsNullOrEmptyOrSpace()) maChon = ClientInformation.NgayLamViecHienTai.StringToDate("yyyyMMdd").GetQuarter().ToString(); foreach (var item in comboBox.Items) { AutoCompleteEntry entry = (AutoCompleteEntry)item; if (entry.DisplayName.Equals(maChon)) comboBox.SelectedItem = item; } } catch (Exception e) { LLogging.WriteLog("", LLogging.LogType.ERR, e); } }
public void GenComboBox_Thang(ref RadComboBox comboBox, string maChon = null) { try { for (int month = 1; month <= 12; month++) { AutoCompleteEntry auto = new AutoCompleteEntry(month.ToString(), month.ToString(), month.ToString()); comboBox.Items.Add(auto); } if (maChon.IsNullOrEmptyOrSpace()) maChon = Convert.ToInt32(ClientInformation.NgayLamViecHienTai.Substring(4, 2)).ToString(); foreach (var item in comboBox.Items) { AutoCompleteEntry entry = (AutoCompleteEntry)item; if (entry.DisplayName.Equals(maChon)) comboBox.SelectedItem = item; } } catch (Exception e) { LLogging.WriteLog("", LLogging.LogType.ERR, e); } }
public void AddItem(AutoCompleteEntry entry) { autoCompletionList.Add(entry); }