Exemplo n.º 1
0
        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!");
        }
Exemplo n.º 2
0
        /// <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)));
        }
Exemplo n.º 3
0
        /// <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;
        }
Exemplo n.º 4
0
 /// <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!");
 }