//添加居民信息档案 public bool addgrjdInfo(bean.grjdxxBean grjd) { int rt = 0; string id = Result.GetNewId(); string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string status = "0"; String sql = "insert into resident_base_info (id,name,sex,birthday,id_number,card_pic,register_address,photo_code,create_time,create_name,aichive_org,is_synchro) values ('" + id + "','" + grjd.name + "','" + grjd.Sex + "', '" + grjd.Birthday + "', '" + grjd.Cardcode + "', '" + grjd.CardPic + "', '" + grjd.Zhuzhi + "', '" + grjd.photo_code + "', '" + time + "', '" + grjd.create_name + "', '" + grjd.aichive_org + "', '" + status + "')"; rt = DbHelperMySQL.ExecuteSql(sql); return(rt == 0 ? false : true); }
//添加居民健康体检表信息 public bool addPhysicalExaminationInfo(bean.grjdxxBean grjd, string barcode) { int rt = 0; string id = Result.GetNewId(); string time = DateTime.Now.ToString("yyyy-MM-dd"); string ctime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); String sql = "insert into physical_examination_record (id,aichive_no,name,id_number,bar_code,check_date,doctor_name,create_user,create_name,create_org,create_org_name,create_time,upload_status,dutydoctor) values ('" + id + "','" + grjd.archive_no + "','" + grjd.name + "','" + grjd.Cardcode + "', '" + barcode + "', '" + time + "', '" + grjd.doctor_name + "', '" + frmLogin.userCode + "', '" + grjd.create_name + "', '" + grjd.create_org + "', '" + frmLogin.organName + "','" + ctime + "', '" + rt + "', '" + grjd.doctor_id + "')"; rt = DbHelperMySQL.ExecuteSql(sql); return(rt == 0 ? false : true); }
//添加居民信息档案 public bool addgrjdInfo(bean.grjdxxBean grjd) { int rt = 0; string id = Result.GetNewId(); string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string status = "1"; String sql = "insert into resident_base_info (id,archive_no,name,sex,birthday,age,id_number,card_pic,address,residence_address,province_code,province_name,city_code,city_name,county_code,county_name,towns_code,towns_name,village_code,village_name,photo_code,status,create_user,create_time,create_name,aichive_org,doctor_id,doctor_name,create_archives_name,create_org,create_org_name,upload_status,nation,phone) values ('" + id + "','" + grjd.archive_no + "','" + grjd.name + "','" + grjd.Sex + "', '" + grjd.Birthday + "', '" + grjd.age + "', '" + grjd.Cardcode + "', '" + grjd.CardPic + "', '" + grjd.Zhuzhi + "', '" + grjd.residence_address + "', '" + grjd.province_code + "', '" + grjd.province_name + "', '" + grjd.city_code + "', '" + grjd.city_name + "', '" + grjd.county_code + "', '" + grjd.county_name + "', '" + grjd.towns_code + "', '" + grjd.towns_name + "', '" + grjd.village_code + "', '" + grjd.village_name + "', '" + grjd.photo_code + "', '" + status + "', '" + frmLogin.userCode + "', '" + time + "', '" + frmLogin.name + "', '" + grjd.aichive_org + "', '" + grjd.doctor_id + "', '" + grjd.doctor_name + "', '" + grjd.create_archives_name + "', '" + frmLogin.organCode + "', '" + frmLogin.organName + "','0','" + grjd.Nation + "','" + grjd.phone + "')"; rt = DbHelperMySQL.ExecuteSql(sql); return(rt == 0 ? false : true); }
//保存体检统计信息 public bool addBgdcInfo(bean.grjdxxBean grjbxx, string barcode, string xcuncode) { int rt = 0; string id = Result.GetNewId(); string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string time1 = DateTime.Now.ToString("yyyy-MM-dd"); String sql = ""; if (grjbxx.age < 65) { sql = "insert into zkhw_tj_bgdc (ID,aichive_no,id_number,bar_code,name,sex,birthday,age,healthchecktime,createtime,area_duns,lnrzlnlpg,lnrzytzbs) value('" + id + "','" + grjbxx.archive_no + "','" + grjbxx.Cardcode + "', '" + barcode + "', '" + grjbxx.name + "', '" + grjbxx.Sex + "', '" + grjbxx.Birthday + "', '" + grjbxx.age + "', '" + time1 + "', '" + time + "', '" + xcuncode + "', '1', '1')"; } else { sql = "insert into zkhw_tj_bgdc (ID,aichive_no,id_number,bar_code,name,sex,birthday,age,healthchecktime,createtime,area_duns) value('" + id + "','" + grjbxx.archive_no + "','" + grjbxx.Cardcode + "', '" + barcode + "', '" + grjbxx.name + "', '" + grjbxx.Sex + "', '" + grjbxx.Birthday + "', '" + grjbxx.age + "', '" + time1 + "', '" + time + "', '" + xcuncode + "')"; } rt = DbHelperMySQL.ExecuteSql(sql); return(rt == 0 ? false : true); }
public void updategejdInfonew(bean.grjdxxBean grjd, int itype) { string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string sql = ""; if (itype == 1) { sql = @"update resident_base_info set name='" + grjd.name + "',sex='" + grjd.Sex + "',nation='" + grjd.Nation + "',birthday='" + grjd.Birthday + "',create_time='" + time + "',phone= '" + grjd.phone + "',address='" + grjd.Zhuzhi + "',doctor_id='" + grjd.doctor_id + "',doctor_name='" + grjd.doctor_name + "',photo_code='" + grjd.photo_code + "' where id_number = '" + grjd.Cardcode + "'"; } else { sql = @"update resident_base_info set name='" + grjd.name + "',sex='" + grjd.Sex + "',nation='" + grjd.Nation + "',birthday='" + grjd.Birthday + "',create_time='" + time + "',phone= '" + grjd.phone + "',address='" + grjd.Zhuzhi + "',photo_code='" + grjd.photo_code + "' where id_number = '" + grjd.Cardcode + "'"; } DbHelperMySQL.ExecuteSql(sql); }
// public void updategejdInfo(bean.grjdxxBean grjd) { string sql = @"update resident_base_info set phone= '" + grjd.phone + "',address='" + grjd.Zhuzhi + "',photo_code='" + grjd.photo_code + "' where id_number = '" + grjd.Cardcode + "'"; DbHelperMySQL.ExecuteSql(sql); }