Beispiel #1
0
        /// <summary>
        /// 删除报价单按钮
        /// </summary>
        /// <param name="offersheet_code"></param>
        private void delOfferSheet(string offersheet_code)
        {
            AccessDB adb = new AccessDB();

            string whereString = " where OFFERSHEET_CODE = '" + offersheet_code + "'";

            if (adb.SQLTableDelete("OSM_HW", whereString) >= 0)
            {
                if (adb.SQLTableDelete("OSM_OFFER_SHEET", whereString) == 1)
                {
                    MessageBox.Show("删除成功!", "消息");
                    queryFromOfferSheetV(dataGridView_OfferSheet);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 取消按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_CANCEL_Click(object sender, EventArgs e)
        {
            //状态为新增
            if (view_state == 0)
            {
                AccessDB adb      = new AccessDB();
                string   whereStr = " where OFFERSHEET_CODE = '" + textBox_OFFERSHEET_CODE.Text + "'";
                if (adb.SQLTableDelete("OSM_HW", whereStr) >= 0)
                {
                    this.Close();
                    this.Dispose();
                }
            }

            //状态为查看
            if (view_state == 1)
            {
                this.Close();
                this.Dispose();
            }

            //状态为编辑
            if (view_state == 2)
            {
                this.Close();
                this.Dispose();
            }
        }
Beispiel #3
0
        /// <summary>
        /// 根据ID删除货物明细记录
        /// </summary>
        /// <param name="hw_id"></param>
        private void DelHwByID(string hw_id)
        {
            AccessDB adb         = new AccessDB();
            string   whereString = "where ID = " + hw_id;

            if (adb.SQLTableDelete("OSM_HW", whereString) > 0)
            {
                MessageBox.Show("删除成功!", "消息");
                queryByHW(dataGridView_HW);
            }
        }