public bool Insert222(processfile w)
        {
            string s = "INSERT INTO projecterror (getId,backtime) VALUE ('" + w.getId + "','" + w.processdate + "')";

            int rows = DBhelper.ExecuteNonQuery(s);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        //修改加工流转单状态
        public bool update4(processfile p)
        {
            string s = "UPDATE fileprocess set year = '" + p.year + "',page ='" + p.page + "',responesible='" + p.responseible + "',process = '" + p.process + "',processdate = '" + p.processdate + "' WHERE bh = '" + p.bh + "'";

            int rows = DBhelper.ExecuteNonQuery(s);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public bool Insert20(processfile w)
        {
            string s = "insert into fileprocess10(projectunit,getId,lzId,filetype,gdmethod,year,dangId,process,processdate,responesible,page) values('" + w.projectunit + "','" + w.getId + "','" + w.lzId + "','" + w.filetype + "','" + w.gdmethod + "','" + w.year + "','" + w.bh + "','" + w.process + "','" + w.processdate + "','" + w.responseible + "','" + w.page + "') ";

            int rows = DBhelper.ExecuteNonQuery(s);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #4
0
 //生成著录加工流转单内容
 public bool Insert5(processfile p)
 {
     return(new WorkDAL().Insert5(p));
 }
Example #5
0
 public bool Insert222(processfile g)
 {
     return(new WorkDAL().Insert222(g));
 }
Example #6
0
 //更改加工流转单状态
 //修改档案状态
 public bool update4(processfile p)
 {
     return(new WorkDAL().update4(p));
 }
Example #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            int i     = dataGridView1.Rows.Count;
            int river = 0;

            for (int j = 0; j < i - 1; j++)
            {
                processfile p = new processfile();
                //      p.bh = textBoxDH.Text.Trim();
                p.bh           = this.dataGridView1.Rows[j].Cells[0].Value.ToString();
                p.filetype     = textBoxDALX.Text.Trim();
                p.gdmethod     = textBoxGDFS.Text.Trim();
                p.getId        = textBoxLQPCH.Text.Trim();
                p.lzId         = textBoxLZDH.Text.Trim();
                p.page         = textBoxYS.Text.Trim();
                p.process      = pppp;
                p.processdate  = dateTimePicker1.Value;
                p.projectunit  = textBoxXMDW.Text.Trim();
                p.responseible = textBoxZRR.Text.Trim();
                p.year         = textBoxNX.Text.Trim();
                if (nowrole == "【拆分】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    river++;

                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【著录】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    // 更改档案状态
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【编码】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    // 更改档案状态
                    bool flag2 = new WorkBAL().update14(p.getId, p.bh);
                    if (flag2 == true)
                    {
                        river++;
                    }
                    this.Close();
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【还原】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    // 更改档案状态
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【扫描】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【编目】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【图处】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    // 更改档案状态
                    bool flag2 = new WorkBAL().update16(p.getId, p.bh);
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【质检】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【挂接】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
                else if (nowrole == "【归还】")
                {
                    MySqlDataReader sdr = new WorkBAL().Selectinfo3(p.bh, p.getId);
                    if (sdr.Read())
                    {
                        sdr.Close();
                        bool flag11 = new WorkBAL().update4(p);
                    }
                    else
                    {
                        sdr.Close();
                        bool flag22 = new WorkBAL().Insert4(p);
                    }
                    river++;
                    raiseCallBackRefreshEvent(); //将事件抛出去,在主窗体中接收,并作相应处理
                }
            }
            if (river == i - 1)
            {
                MessageBox.Show("提交成功");
            }
            else
            {
                MessageBox.Show("提交失败");
            }
        }