Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            QCScoreItem_DataEntity socreItementity = SetEntity();

            if (socreItementity == null)
            {
                return;
            }
            string edittype = "";

            //表示为新增
            if (m_scoreitem == null)
            {
                edittype = "0";
            }
            else
            {
                edittype = "1";
                socreItementity.Itemcode = m_scoreitem.Itemcode;
            }

            SqlManger m_sqlmanger = new SqlManger(m_app);

            m_sqlmanger.EditQCItemScore(edittype, socreItementity);

            m_app.CustomMessageBox.MessageShow("保存成功!");
            ISRefresh = true;
            this.Close();
        }
Esempio n. 2
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (gridViewScoreItem.FocusedRowHandle < 0)
            {
                return;
            }
            DataRow foucesRow = gridViewScoreItem.GetDataRow(gridViewScoreItem.FocusedRowHandle);

            if (foucesRow == null)
            {
                return;
            }

            if (foucesRow.IsNull("ITEMCODE"))
            {
                return;
            }

            m_sqlManger.EditQCItemScore("2", FillQCTypeValue2Entity(foucesRow));

            m_app.CustomMessageBox.MessageShow("删除成功!");

            BindDataSource();
        }