private void cmbQuan_EditValueChanged(object sender, EventArgs e) { if (cmbQuan.EditValue != DBNull.Value) { QLMamNon.Dao.QLMamNonDs.PhuongXaDataTable table = StaticDataFacade.Get(StaticDataKeys.PhuongXa) as QLMamNon.Dao.QLMamNonDs.PhuongXaDataTable; this.phuongXaRowBindingSource.DataSource = table.Select(String.Format("QuanHuyenId={0}", cmbQuan.EditValue)); } }
public static string GetPhuongXaById(QLMamNon.Dao.QLMamNonDs.PhuongXaDataTable table, Int32 id) { if (id < 0) { return(CommonConstant.EMPTY); } DataRow[] rows = table.Select(String.Format("PhuongXaId={0}", id)); if (rows != null && rows.Length > 0) { return(rows[0]["Name"] as String); } return(CommonConstant.EMPTY); }