public bool hasData() { if (!string.IsNullOrEmpty(this.CardID)) { DataSet list = new KidsThreeToSixYearOldDAL().GetList(" IDCardNo='" + this.CardID + "'"); if (list != null && list.Tables.Count > 0 && list.Tables[0].Rows.Count > 0) { return(true); } } return(false); }
private KidsThreeToSixYearOldModel getModel(string type) { string str = (Convert.ToInt32(type) + 2).ToString(); KidsThreeToSixYearOldDAL kidsThreeToSixYearOldDAL = new KidsThreeToSixYearOldDAL(); DataSet list = kidsThreeToSixYearOldDAL.GetList("IDCardNo='" + this.CardID + "' and flag=" + str); if (list != null && list.Tables.Count > 0 && list.Tables[0].Rows.Count > 0) { return(kidsThreeToSixYearOldDAL.DataRowToModel(list.Tables[0].Rows[0])); } return(null); }