/// <summary> /// 获取G_Street实体List /// </summary> /// <param name="dt">源数据表</param> /// <returns></returns> public List <G_Street> G_Street(DataTable dt) { List <G_Street> modelList = new List <G_Street>(); G_Street model; for (int n = 0; n < dt.Rows.Count; n++) { model = new G_Street(); try{ model.s_id = (int)dt.Rows[n]["s_id"]; } catch { } model.s_name = dt.Rows[n]["s_name"].ToString(); try{ model.d_id = (int)dt.Rows[n]["d_id"]; } catch { } model.s_phone = dt.Rows[n]["s_phone"].ToString(); try{ model.s_examine = (bool)dt.Rows[n]["s_examine"]; } catch { } modelList.Add(model); } return(modelList); }
/// <summary> /// 删除街道 /// </summary> /// <param name="mod">G_Street实体</param> public bool DelStreet(G_Street mod) { bool b = false; OpSql.Open(); try { b = OpSql.Delete(new object[] { mod }); } catch { } finally { OpSql.Close(); } return(b); }