/// <summary> /// 更新数据到报名 /// </summary> /// <param name="bmk"></param> private int UpdateBmkBase(Bmk bmk) { ArrayList al = new ArrayList(); //报名序号 al.Add(OleDbHelper.CreateInParam("bmxh", OleDbType.Char, 9, bmk.bmxh)); al.Add(OleDbHelper.CreateInParam("xm", OleDbType.Char, 8, bmk.xm)); al.Add(OleDbHelper.CreateInParam("sfzh", OleDbType.Char, 18, bmk.sfzh)); al.Add(OleDbHelper.CreateInParam("xb", OleDbType.Char, 1, bmk.xb)); al.Add(OleDbHelper.CreateInParam("mz", OleDbType.Char, 1, bmk.mz)); al.Add(OleDbHelper.CreateInParam("csny", OleDbType.Char, 8, bmk.csny)); al.Add(OleDbHelper.CreateInParam("hk", OleDbType.Char, 2, bmk.hk)); al.Add(OleDbHelper.CreateInParam("syqk", OleDbType.Char, 1, bmk.syqk)); al.Add(OleDbHelper.CreateInParam("kslb", OleDbType.Char, 1, bmk.kslb)); al.Add(OleDbHelper.CreateInParam("byxxdm", OleDbType.Char, 4, bmk.byxxdm)); al.Add(OleDbHelper.CreateInParam("byxxmc", OleDbType.Char, 16, bmk.byxxmc)); al.Add(OleDbHelper.CreateInParam("xh", OleDbType.Char, 2, bmk.xh)); al.Add(OleDbHelper.CreateInParam("class", OleDbType.Char, 2, bmk.bj)); al.Add(OleDbHelper.CreateInParam("jtzz", OleDbType.Char, 50, bmk.jtzz)); al.Add(OleDbHelper.CreateInParam("tel", OleDbType.Char, 30, bmk.tel)); al.Add(OleDbHelper.CreateInParam("post", OleDbType.Char, 6, bmk.post)); al.Add(OleDbHelper.CreateInParam("ty", OleDbType.Char, 1, bmk.ty )); al.Add(OleDbHelper.CreateInParam("bz1", OleDbType.Char, 2, bmk.bz1)); al.Add(OleDbHelper.CreateInParam("xstbh", OleDbType.Char, 9, bmk.xstbh)); string strSql = @"update bmk ";// strSql += " set bmxh = ? , xm = ? , sfzh = ? , xb = ? ,mz = ? , csny = ?, hk = ? ,syqk= ? , kslb = ? , byxxdm = ?, byxxmc = ?, xh = ? , class = ? , jtzz = ? , tel = ? , post = ? ,ty = ? ,bz1 = ? "; strSql += " where xstbh = ? "; return OleDbHelper.ExcuteSQL(this.VfpConnection, strSql, (OleDbParameter[])al.ToArray(typeof(OleDbParameter))); }
/// <summary> /// 更新 艺术劳技术实验数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void miUpdateToSuzhi_Click(object sender, EventArgs e) { foreach (var bmk in this.BmkList) { ArrayList al = new ArrayList(); //素科成绩 //al.Add(OleDbHelper.CreateInParam("km61", OleDbType.Decimal, 2, bmk.km61)); //al.Add(OleDbHelper.CreateInParam("km62", OleDbType.Decimal, 2, bmk.km62)); //al.Add(OleDbHelper.CreateInParam("km63", OleDbType.Decimal, 2, bmk.km63)); //al.Add(OleDbHelper.CreateInParam("km6", OleDbType.Decimal, 2, bmk.km6)); //测评等第 al.Add(OleDbHelper.CreateInParam("km71", OleDbType.Char, 1, bmk.km71)); al.Add(OleDbHelper.CreateInParam("km72", OleDbType.Char, 1, bmk.km72)); al.Add(OleDbHelper.CreateInParam("km73", OleDbType.Char, 1, bmk.km73)); al.Add(OleDbHelper.CreateInParam("km74", OleDbType.Char, 1, bmk.km74)); //综合表现评定 al.Add(OleDbHelper.CreateInParam("km8", OleDbType.LongVarChar, 1024, bmk.km8)); al.Add(OleDbHelper.CreateInParam("km81", OleDbType.Char, 10, bmk.km81)); //报名序号 al.Add(OleDbHelper.CreateInParam("bmxh", OleDbType.Char, 9, bmk.bmxh)); string strSql = @"update bmk "; strSql += " set km71 = ? , km72 = ? ,km73 = ? , km74 = ? "; strSql += " ,km8 = ? , km81 = ? "; strSql += " where bmxh = ? "; //OleDbHelper.ExcuteSQL(this.VfpConnection, strSql, (OleDbParameter[])al.ToArray(typeof(OleDbParameter))); } MessageBox.Show("OK!"); }
private void PullZhiyuan() { int i = 0; foreach (var bmk in this.BmkList) { ArrayList al = new ArrayList(); //测评等第 al.Add(OleDbHelper.CreateInParam("zy11", OleDbType.Char, 3, bmk.zy11)); al.Add(OleDbHelper.CreateInParam("zy12", OleDbType.Char, 3, bmk.zy12)); al.Add(OleDbHelper.CreateInParam("zy21", OleDbType.Char, 3, bmk.zy21)); al.Add(OleDbHelper.CreateInParam("zy22", OleDbType.Char, 3, bmk.zy22)); al.Add(OleDbHelper.CreateInParam("zy31", OleDbType.Char, 3, bmk.zy31)); al.Add(OleDbHelper.CreateInParam("zy32", OleDbType.Char, 3, bmk.zy32)); al.Add(OleDbHelper.CreateInParam("zy33", OleDbType.Char, 3, bmk.zy33)); al.Add(OleDbHelper.CreateInParam("jb", OleDbType.Char, 1, bmk.jb)); al.Add(OleDbHelper.CreateInParam("fc", OleDbType.Char, 1, bmk.fc)); //报名序号 al.Add(OleDbHelper.CreateInParam("bmxh", OleDbType.Char, 9, bmk.bmxh)); string strSql = @"update bmk "; strSql += " set zy11 = ? , zy12 = ? ,zy21 = ? , zy22 = ?,zy31 = ? , zy32 = ?, zy33 = ? , jb = ? , fc = ? "; strSql += " where bmxh = ? "; OleDbHelper.ExcuteSQL(this.VfpConnection, strSql, (OleDbParameter[])al.ToArray(typeof(OleDbParameter))); i++; this.toolStripProgressBar1.Value = i; this.toolStripStatusLabel1.Text = string.Format("拉取志愿信息{0}/{1}", i, this.BmkList.Count); } MessageBox.Show("OK!"); }
/// <summary> /// 插入报名信息表 /// </summary> /// <param name="bmk"></param> /// <returns></returns> private int InsertBmkBase(Bmk bmk) { ArrayList al = new ArrayList(); //报名序号 al.Add(OleDbHelper.CreateInParam("bmxh", OleDbType.Char, 9, bmk.bmxh ?? "")); al.Add(OleDbHelper.CreateInParam("xstbh", OleDbType.Char, 9, bmk.xstbh)); al.Add(OleDbHelper.CreateInParam("sfzh", OleDbType.Char, 18, bmk.sfzh)); al.Add(OleDbHelper.CreateInParam("xb", OleDbType.Char, 1, bmk.xb)); al.Add(OleDbHelper.CreateInParam("mz", OleDbType.Char, 1, bmk.mz)); al.Add(OleDbHelper.CreateInParam("csny", OleDbType.Char, 8, bmk.csny)); al.Add(OleDbHelper.CreateInParam("hk", OleDbType.Char, 2, bmk.hk)); al.Add(OleDbHelper.CreateInParam("syqk", OleDbType.Char, 1, bmk.syqk)); al.Add(OleDbHelper.CreateInParam("kslb", OleDbType.Char, 1, bmk.kslb)); al.Add(OleDbHelper.CreateInParam("byxxdm", OleDbType.Char, 4, bmk.byxxdm)); al.Add(OleDbHelper.CreateInParam("byxxmc", OleDbType.Char, 16, bmk.byxxmc)); al.Add(OleDbHelper.CreateInParam("xh", OleDbType.Char, 2, bmk.xh)); al.Add(OleDbHelper.CreateInParam("class", OleDbType.Char, 2, bmk.bj)); al.Add(OleDbHelper.CreateInParam("jtzz", OleDbType.Char, 50, bmk.jtzz)); al.Add(OleDbHelper.CreateInParam("tel", OleDbType.Char, 30, bmk.tel)); al.Add(OleDbHelper.CreateInParam("post", OleDbType.Char, 6, bmk.post)); al.Add(OleDbHelper.CreateInParam("zkzh", OleDbType.Char, 11, bmk.zkzh)); string strSql = @"insert into bmk (bmxh,xstbh,sfzh, xb,mz,csny,hk,syqk, kslb,byxxdm,byxxmc,xh,class, jtzz,tel,post)"; strSql += " values (?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?) "; Debug.Write(strSql); return OleDbHelper.ExcuteSQL(this.VfpConnection, strSql, (OleDbParameter[])al.ToArray(typeof(OleDbParameter))); // return 1; }
/// <summary> /// 拉取体测项目 /// </summary> public void PullTcxm() { int i = 0; foreach (var bmk in this.BmkList) { OleDbParameter[] param = new OleDbParameter[2]; param[0] = OleDbHelper.CreateInParam("tcxm", OleDbType.Char, 2, bmk.tcxm); param[1] = OleDbHelper.CreateInParam("bmxh", OleDbType.Char, 9, bmk.bmxh); string strSql = @"update bmk set tcxm = ? where bmxh = ? "; OleDbHelper.ExcuteSQL(this.VfpConnection, strSql, param); i++; this.toolStripProgressBar1.Value = i; this.toolStripStatusLabel1.Text = string.Format("拉取体测项目{0}/{1}", i, this.BmkList.Count); } MessageBox.Show("OK!"); }