public ChildYingyanggeanObj getYingyanggeanObj(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; try { sdr = dg.executequery(sqls); ChildYingyanggeanObj obj = null; if (!sdr.HasRows) { return(null); } else { sdr.Read(); obj = new ChildYingyanggeanObj(); obj.id = Convert.ToInt32(sdr["id"]); obj.childId = Convert.ToInt32(sdr["childId"]); obj.jiwangshi = sdr["jiwangshi"].ToString(); obj.endtime = sdr["endtime"].ToString(); obj.managetime = sdr["managetime"].ToString(); obj.zhuangui = sdr["zhuangui"].ToString(); obj.chushengshi = sdr["chushengshi"].ToString(); obj.weiyangshi = sdr["weiyangshi"].ToString(); obj.foodchange = sdr["foodchange"].ToString(); obj.recordtime = sdr["recordtime"].ToString(); obj.recordname = sdr["recordname"].ToString(); obj.yunzhou = sdr["yunzhou"].ToString(); obj.yuntian = sdr["yuntian"].ToString(); obj.hb = sdr["hb"].ToString(); obj.tieji = sdr["tieji"].ToString(); obj.yaowu = sdr["yaowu"].ToString(); obj.jiliang = sdr["jiliang"].ToString(); obj.liaocheng = sdr["liaocheng"].ToString(); obj.muru = sdr["muru"].ToString(); obj.foodage = sdr["foodage"].ToString(); obj.buruqi = sdr["buruqi"].ToString(); obj.childvitd = sdr["childvitd"].ToString(); obj.startvitdmonth = sdr["startvitdmonth"].ToString(); obj.startvitdday = sdr["startvitdday"].ToString(); obj.vitdname = sdr["vitdname"].ToString(); obj.vitdliang = sdr["vitdliang"].ToString(); obj.tizheng = sdr["tizheng"].ToString(); obj.xuegai = sdr["xuegai"].ToString(); obj.xuelin = sdr["xuelin"].ToString(); obj.xueakp = sdr["xueakp"].ToString(); obj.xueoh = sdr["xueoh"].ToString(); obj.xjiancha = sdr["xjiancha"].ToString(); } return(obj); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
private void Start() { dateLogic = FindObjectOfType <DateLogic> (); keywords = GetComponent <KeyWords> (); objects = GetComponent <LoadObjects> (); path = Application.persistentDataPath + "/dataValues.dat"; }
/// <summary> /// 儿童保健对象 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public childSetbaoJiangGuidObj getbaojianobj(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; childSetbaoJiangGuidObj obj = null; ArrayList arraylist = new ArrayList();; try { sdr = dg.executequery(sqls); if (!sdr.HasRows) { return(null); } else { obj = new childSetbaoJiangGuidObj(); sdr.Read();//读取第一行数据记录 obj.Id = Convert.ToInt32(sdr["id"]); //obj.ChildId = Convert.ToInt32(sdr["childId"]); obj.Setage = sdr["setage"].ToString(); obj.Eduction = sdr["eduction"].ToString(); obj.Shanshi = sdr["shanshi"].ToString(); obj.Jibing = sdr["jibing"].ToString(); obj.Huli = sdr["huli"].ToString(); return(obj); } } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; //ErrorHandle.OnError(ex); } }
/// <summary> /// 查询一般护理记录单记录 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public UpdateVersionobj getUpdateVersionobj(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader drs = null; try { drs = dg.executequery(sqls); UpdateVersionobj updateobj = null; if (!drs.HasRows) { return(null); } else { drs.Read();//读取第一行数据记录 updateobj = new UpdateVersionobj(); updateobj.id = Convert.ToInt32(drs["id"]); updateobj.version = drs["version"].ToString(); updateobj.updatetime = drs["updatetime"].ToString(); updateobj.updatecontent = drs["updatecontent"].ToString(); updateobj.isfabu = Convert.ToInt32(drs["isfabu"]); } return(updateobj); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
public ArrayList getContentlist(int p_id) { string sqls = "select * from tb_gaoweicontent where p_id=" + p_id; DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList(); try { sdr = dg.executequery(sqls); ProjectGaoweiobj obj = null; while (sdr.Read()) { obj = new ProjectGaoweiobj(); obj.id = Convert.ToInt32(sdr["id"]); obj.type = sdr["p_id"].ToString(); obj.content = sdr["content"].ToString(); arraylist.Add(obj); } } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } return(arraylist); }
/// <summary> /// 查询儿童体检信息 返回集合 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public ArrayList getSetCheckAgeList(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList();; try { sdr = dg.executequery(sqls); if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { //sdr.Read();//读取第一行数据记录 childSetCheckAgeObj obj = new childSetCheckAgeObj(); obj.Id = Convert.ToInt32(sdr["id"]); //obj.ChildId = Convert.ToInt32(sdr["childId"]); obj.CheckMonth = sdr["checkMonth"].ToString(); obj.CheckContent = sdr["checkContent"].ToString(); obj.IsCheck = Convert.ToInt32(sdr["isCheck"]); arraylist.Add(obj); } } } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } return(arraylist); }
/// <summary> /// 查询儿童体检情况基本信息 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public ProjectGaoweiobj getprojectobj(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; try { sdr = dg.executequery(sqls); ProjectGaoweiobj obj = null; if (!sdr.HasRows) { return(null); } else { sdr.Read();//读取第一行数据记录 obj = new ProjectGaoweiobj(); obj.id = Convert.ToInt32(sdr["id"]); obj.type = sdr["type"].ToString(); } return(obj); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
public ChildGaoweigeanObj getGaoweigeanObj(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; try { sdr = dg.executequery(sqls); ChildGaoweigeanObj obj = null; if (!sdr.HasRows) { return(null); } else { sdr.Read(); obj = new ChildGaoweigeanObj(); obj.id = Convert.ToInt32(sdr["id"]); obj.childId = Convert.ToInt32(sdr["childId"]); obj.jiwangshi = sdr["jiwangshi"].ToString(); obj.endtime = sdr["endtime"].ToString(); obj.managetime = sdr["managetime"].ToString(); obj.zhuangui = sdr["zhuangui"].ToString(); obj.zhuanzhendanwei = sdr["zhuanzhendanwei"].ToString(); obj.recordtime = sdr["recordtime"].ToString(); obj.recordname = sdr["recordname"].ToString(); } return(obj); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
public bool ifhascount(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader drs = null; try { drs = dg.executequery(sqls); if (drs.HasRows) { return(false); } else { return(true); } } catch (Exception ex) { throw ex; } finally { drs.Close(); dg.con_close(); } }
/// <summary> /// 体检评价 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public ChildCheckObj getCheckobj(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; try { sdr = dg.executequery(sqls); ChildCheckObj obj = null; if (!sdr.HasRows) { return(null); } else { sdr.Read();//读取第一行数据记录 obj = new ChildCheckObj(); obj.Id = Convert.ToInt32(sdr["id"]); obj.ChildId = Convert.ToInt32(sdr["childId"]); obj.nuerzhidao = sdr["nuerzhidao"].ToString(); obj.checkdiagnose = sdr["checkdiagnose"].ToString(); obj.zonghefazhan = sdr["zonghefazhan"].ToString(); } return(obj); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
public childSetNutritionguidObj getNutritionguidobj(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; childSetNutritionguidObj obj = null; ArrayList arraylist = new ArrayList();; try { sdr = dg.executequery(sqls); if (!sdr.HasRows) { return(null); } else { obj = new childSetNutritionguidObj(); sdr.Read(); //读取第一行数据记录 obj.Id = Convert.ToInt32(sdr["id"]); //obj.ChildId = Convert.ToInt32(sdr["childId"]); obj.SetAge = sdr["setAge"].ToString(); //obj.SetContent = sdr["setContent"].ToString(); obj.Shiyongxing = sdr["shiyongxing"].ToString(); obj.Bigdongzuo = sdr["bigdongzuo"].ToString(); //obj.TYPE =Convert.ToInt32(sdr["type"]); return(obj); } } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
private void Start() { //Create references to the scripts dateLogic = FindObjectOfType <DateLogic> (); keywords = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <KeyWords> (); //Create new instance of the CollectObjects script collectObjects = new CollectObjects(); path = Application.persistentDataPath + "/dataValues.dat"; }
public ArrayList getwhoStandard_list(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList(); try { sdr = dg.executequery(sqls); WhoChildStandardObj obj = null; if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { obj = new WhoChildStandardObj(); obj.month = Convert.ToInt32(sdr["month"]); obj.l = sdr["l"].ToString(); obj.m = sdr["m"].ToString(); obj.s = sdr["s"].ToString(); obj.sd = sdr["sd"].ToString(); obj.p01 = sdr["p01"].ToString(); obj.p1 = sdr["p1"].ToString(); obj.p3 = sdr["p3"].ToString(); obj.p5 = sdr["p5"].ToString(); obj.p10 = sdr["p10"].ToString(); obj.p15 = sdr["p15"].ToString(); obj.p25 = sdr["p25"].ToString(); obj.p50 = sdr["p50"].ToString(); obj.p75 = sdr["p75"].ToString(); obj.p85 = sdr["p85"].ToString(); obj.p90 = sdr["p90"].ToString(); obj.p95 = sdr["p95"].ToString(); obj.p97 = sdr["p97"].ToString(); obj.p99 = sdr["p99"].ToString(); obj.p999 = sdr["p999"].ToString(); obj.sex = sdr["sex"].ToString(); obj.ptype = sdr["ptype"].ToString(); obj.length = sdr["length"].ToString(); arraylist.Add(obj); } } return(arraylist); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
private void button5_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { if (dataGridView1.SelectedRows[0].Tag != "") { UpdateVersionobj versionobj = dataGridView1.SelectedRows[0].Tag as UpdateVersionobj; //if (MessageBox.Show("确定要上传更新包吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) //{ Cursor.Current = Cursors.WaitCursor; OpenFileDialog filename = new OpenFileDialog(); filename.InitialDirectory = Application.StartupPath; filename.Filter = "压缩文件|*.zip"; filename.RestoreDirectory = true; if (filename.ShowDialog() == DialogResult.OK) { string path = filename.FileName.ToString(); //string name = path.Substring(path.LastIndexOf("\\")+1); //保存文件到SQL Server数据库中 FileInfo fi = new FileInfo(path); FileStream fs = fi.OpenRead(); byte[] bytes = new byte[fs.Length]; fs.Read(bytes, 0, Convert.ToInt32(fs.Length)); DateLogic dg = new DateLogic(); SqlConnection con = dg.getconn(); SqlCommand cm = new SqlCommand("update updateversion set updateprogram =@updateprogram,updatetime=@updatetime where id=@id", con); SqlParameter spFile = new SqlParameter("@updateprogram", SqlDbType.Image); SqlParameter spupdatetime = new SqlParameter("@updatetime", SqlDbType.Char); SqlParameter spid = new SqlParameter("@id", SqlDbType.Char); spFile.Value = bytes; spupdatetime.Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); spid.Value = versionobj.id; cm.Parameters.Add(spFile); cm.Parameters.Add(spupdatetime); cm.Parameters.Add(spid); cm.ExecuteNonQuery(); RefreshRecordList(); } //} } } else { MessageBox.Show("请选择要上传的版本!", "系统提示"); } }
/// <summary> /// 删除 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public int deleterecord(string sqls) { DateLogic dg = new DateLogic(); try { return(dg.executeupdate(sqls)); } catch (Exception ex) { MessageBox.Show("保存失败", "软件提示"); throw ex; } }
static void Main(string[] args) { DateLogic dl = new DateLogic(); try { DateTime date1 = dl.DateValidator(args[0]); DateTime date2 = dl.DateValidator(args[1]); Console.WriteLine(dl.DateRange(date1, date2)); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public ArrayList getchildStandard_w_hlist(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList(); try { sdr = dg.executequery(sqls); ChildStandard_w_hObj obj = null; if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { obj = new ChildStandard_w_hObj(); obj.id = Convert.ToInt32(sdr["id"]); obj.sex = sdr["sex"].ToString(); obj.hight = Convert.ToInt32(sdr["hight"]); obj.wd_3th = sdr["wd_3th"].ToString(); obj.wd_5th = sdr["wd_5th"].ToString(); obj.wd_10th = sdr["wd_10th"].ToString(); obj.wd_15th = sdr["wd_15th"].ToString(); obj.wd_25th = sdr["wd_25th"].ToString(); obj.wd_50th = sdr["wd_50th"].ToString(); obj.wd_75th = sdr["wd_75th"].ToString(); obj.wd_85th = sdr["wd_85th"].ToString(); obj.wd_90th = sdr["wd_90th"].ToString(); obj.wd_95th = sdr["wd_95th"].ToString(); obj.wd_97th = sdr["wd_97th"].ToString(); arraylist.Add(obj); } } return(arraylist); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
public string getGaoweistr(int childid, string gaoweitime, string type) { string sqls = "select * from tb_gaowei where childid=" + childid; if (!string.IsNullOrEmpty(gaoweitime)) { sqls += " and recordtime='" + gaoweitime + "'"; } if (!string.IsNullOrEmpty(type)) { sqls += " and type='" + type + "'"; } DateLogic dg = new DateLogic(); SqlDataReader sdr = null; string gaoweilist = ""; try { sdr = dg.executequery(sqls); if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { if (string.IsNullOrEmpty(gaoweilist)) { gaoweilist += sdr["gaoweiyinsu"].ToString(); } else { gaoweilist += "," + sdr["gaoweiyinsu"].ToString(); } } } return(gaoweilist); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
/// <summary> /// 查询儿童体检信息 返回集合 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public ArrayList getyimiaoList(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList();; try { sdr = dg.executequery(sqls); if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { //sdr.Read();//读取第一行数据记录 childSetyimiaoObj obj = new childSetyimiaoObj(); obj.Id = Convert.ToInt32(sdr["id"]); //obj.ChildId = Convert.ToInt32(sdr["childId"]); obj.YimiaoName = sdr["yimiaoName"].ToString(); obj.FactorName = sdr["factorName"].ToString(); obj.ProductionDay = sdr["productionDay"].ToString(); obj.Pihao = sdr["pihao"].ToString(); obj.Guige = sdr["guige"].ToString(); obj.JiliangUnit = sdr["jiliangUnit"].ToString(); obj.Month = sdr["month"].ToString(); arraylist.Add(obj); } } } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } return(arraylist); }
public ArrayList getChildCheckListquexiantu(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList(); try { sdr = dg.executequery(sqls); ChildCheckObj obj = null; if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { obj = new ChildCheckObj(); obj.Id = Convert.ToInt32(sdr["id"]); obj.ChildId = Convert.ToInt32(sdr["childId"]); obj.CheckDay = sdr["checkDay"].ToString(); obj.CheckHeight = sdr["checkHeight"].ToString(); obj.CheckWeight = sdr["checkWeight"].ToString(); obj.CheckTouwei = sdr["checkTouwei"].ToString(); obj.Fuwei = sdr["fuwei"].ToString(); arraylist.Add(obj); } } return(arraylist); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
public ArrayList getGaoweilist(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList(); try { sdr = dg.executequery(sqls); TbGaoweiObj obj = null; if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { obj = new TbGaoweiObj(); obj.id = Convert.ToInt32(sdr["id"]); obj.childId = Convert.ToInt32(sdr["childId"]); obj.gaoweiyinsu = sdr["gaoweiyinsu"].ToString(); obj.recordtime = sdr["recordtime"].ToString(); obj.type = sdr["type"].ToString(); obj.doctorName = sdr["doctorName"].ToString(); arraylist.Add(obj); } } return(arraylist); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
/// <summary> /// 查询模板列表 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public ArrayList getMobanList(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList();; try { sdr = dg.executequery(sqls); if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { //sdr.Read();//读取第一行数据记录 mobanManageObj obj = new mobanManageObj(); obj.id = Convert.ToInt32(sdr["id"]); obj.m_name = sdr["m_name"].ToString(); obj.m_type = sdr["m_type"].ToString(); obj.m_content = sdr["m_content"].ToString(); obj.yf = sdr["yf"].ToString(); obj.yfend = sdr["yfend"].ToString(); arraylist.Add(obj); } } } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } return(arraylist); }
/// <summary> /// 查询儿童体检情况及营养不良记录基本信息 /// </summary> /// <param name="sqls"></param> /// <returns></returns> public ArrayList getChildCheckAndYingyangList(string sqls) { DateLogic dg = new DateLogic(); SqlDataReader sdr = null; ArrayList arraylist = new ArrayList(); try { sdr = dg.executequery(sqls); ChildCheckObj obj = null; if (!sdr.HasRows) { return(null); } else { while (sdr.Read()) { obj = new ChildCheckObj(); obj.Id = Convert.ToInt32(sdr["id"]); obj.ChildId = Convert.ToInt32(sdr["childId"]); obj.CheckAge = sdr["checkFactAge"].ToString(); //obj.CheckFactAge = sdr["checkFactAge"].ToString(); obj.CheckDay = sdr["checkDay"].ToString(); obj.DoctorName = sdr["doctorName"].ToString(); obj.CheckHeight = sdr["checkHeight"].ToString(); obj.CheckWeight = sdr["checkWeight"].ToString(); obj.CheckTouwei = sdr["checkTouwei"].ToString(); obj.Fuwei = sdr["fuwei"].ToString(); obj.CheckZuogao = sdr["checkZuogao"].ToString(); obj.CheckTunwei = sdr["checkTunwei"].ToString(); obj.CheckQianlu = sdr["checkQianlu"].ToString(); obj.CheckIQ = sdr["checkIQ"].ToString(); obj.CheckZiping = sdr["checkZiping"].ToString(); //obj.YuCeHeight = sdr["yuCeHeight"].ToString(); obj.Leftyan = sdr["leftyan"].ToString(); obj.Rightyan = sdr["rightyan"].ToString(); obj.Leftyanshili = sdr["leftyanshili"].ToString(); obj.Rightyanshili = sdr["rightyanshili"].ToString(); obj.Xieshi = sdr["xieshi"].ToString(); obj.Lefter = sdr["lefter"].ToString(); obj.Righter = sdr["righter"].ToString(); obj.Lefterlisten = sdr["lefterlisten"].ToString(); obj.Rightlisten = sdr["rightlisten"].ToString(); obj.Checkbi = sdr["checkbi"].ToString(); obj.KouQiang = sdr["kouQiang"].ToString(); obj.YaciNumber = sdr["yaciNumber"].ToString(); obj.YuciNumber = sdr["yuciNumber"].ToString(); obj.Skin = sdr["skin"].ToString(); obj.Lingbaji = sdr["lingbajie"].ToString(); obj.BianTaoti = sdr["bianTaoti"].ToString(); obj.XinZang = sdr["xinZang"].ToString(); obj.FeiBu = sdr["feiBu"].ToString(); obj.GanZang = sdr["ganZang"].ToString(); obj.PiZang = sdr["piZang"].ToString(); obj.QiZhi = sdr["qiZhi"].ToString(); obj.SiZhi = sdr["siZhi"].ToString(); obj.XiongBu = sdr["xiongBu"].ToString(); obj.MiNiaoQi = sdr["miNiaoQi"].ToString(); obj.WuGuan = sdr["wuGuan"].ToString(); obj.JiZhu = sdr["jiZhu"].ToString(); obj.PingPqiu = sdr["pingPqiu"].ToString(); obj.CheckContent = sdr["checkContent"].ToString(); obj.YufangJiezhong = sdr["yufangJiezhong"].ToString(); obj.BloodseSu = sdr["bloodseSu"].ToString(); obj.ShiWugouCheng = sdr["shiWugouCheng"].ToString(); obj.Vitd = sdr["vitd"].ToString(); obj.BigSport = sdr["bigSport"].ToString(); obj.SpirtSport = sdr["spirtSport"].ToString(); obj.Laguage = sdr["laguage"].ToString(); obj.SignSocial = sdr["signSocial"].ToString(); obj.OtherBingshi = sdr["otherBingshi"].ToString(); obj.Handle = sdr["handle"].ToString(); obj.Diagnose = sdr["diagnose"].ToString(); obj.CheckMonth = sdr["checkMonth"].ToString(); obj.FuzenDay = sdr["fuzenDay"].ToString(); obj.Fubu = sdr["fubu"].ToString(); obj.nuerzhidao = sdr["nuerzhidao"].ToString(); obj.checkdiagnose = sdr["checkdiagnose"].ToString(); obj.zhushi = sdr["zhushi"].ToString(); obj.fushi = sdr["fushi"].ToString(); obj.shehui = sdr["shehui"].ToString(); obj.dongzuo = sdr["dongzuo"].ToString(); obj.toulu = sdr["toulu"].ToString(); obj.gouloubing = sdr["gouloubing"].ToString(); if (!String.IsNullOrEmpty(sdr["recordid"].ToString())) { obj.yingyangrecordobj.id = Convert.ToInt32(sdr["recordid"]); } obj.yingyangrecordobj.pinggu = sdr["pinggu"].ToString(); obj.yingyangrecordobj.problem = sdr["problem"].ToString(); obj.yingyangrecordobj.zhidao = sdr["zhidao"].ToString(); arraylist.Add(obj); } } return(arraylist); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员", "软件提示"); throw ex; } }
private void button1_Click(object sender, EventArgs e) { string sqls = "select * from temp1 "; DateLogic dg = new DateLogic(); SqlDataReader sdr = dg.executequery(sqls); if (sdr.HasRows) { while (sdr.Read()) { string[] bb = sdr["aaaa"].ToString().Split(' '); string[] dd = new string[20]; int j = 0; for (int i = 0; i < bb.Length; i++) { if (!String.IsNullOrEmpty(bb[i])) { dd[j] = bb[i]; j++; } } string insertsql = "insert into who_childstand_day (" + " tian " + " ,l " + " ,m " + " ,s " + " ,p01 " + " ,p1 " + " ,p3 " + " ,p5 " + " ,p10 " + " ,p15 " + " ,p25 " + " ,p50 " + " ,p75 " + " ,p85 " + " ,p90 " + " ,p95 " + " ,p97 " + " ,p99 " + " ,p999 " + " ,sex " + " ,ptype " + " ) values (" + "'" + dd[0] + "'" + ",'" + dd[1] + "'" + ",'" + dd[2] + "'" + ",'" + dd[3] + "'" + ",'" + dd[4] + "'" + ",'" + dd[5] + "'" + ",'" + dd[6] + "'" + ",'" + dd[7] + "'" + ",'" + dd[8] + "'" + ",'" + dd[9] + "'" + ",'" + dd[10] + "'" + ",'" + dd[11] + "'" + ",'" + dd[12] + "'" + ",'" + dd[13] + "'" + ",'" + dd[14] + "'" + ",'" + dd[15] + "'" + ",'" + dd[16] + "'" + ",'" + dd[17] + "'" + ",'" + dd[18] + "'" + ",'" + textBox1.Text + "'" + ",'" + textBox2.Text + "'" + ")"; dg.executeupdate(insertsql); } } MessageBox.Show("转换完成"); //string aa = "24 1 87.1161 0.03507 3.0551 77.7 80 81.4 82.1 83.2 83.9 85.1 87.1 89.2 90.3 91 92.1 92.9 94.2 "; }