private void simpleButton_SaveTea_Click(object sender, System.EventArgs e) { // isForStudent = false; // lastSyncIndex = 0; // isSendCustomButtonSucceed = false; // BeginToSendCustomButtonInfo(); // simpleButton_SaveStu.Enabled = false; // simpleButton_SaveTea.Enabled = false; /*以上是新功能*/ FlowStateSystem flowStateSystem = new FlowStateSystem(); for (int i = 0; i < gridView2.RowCount; i++) { Int16 stateID = (Int16)(Convert.ToInt16(gridView2.GetDataRow(i)["teafs_state"]) + 2); string stateName = gridView2.GetDataRow(i)["teafs_name"].ToString(); flowStateSystem.UpdateTeaState(stateID, stateName); // if (isSendCustomButtonSucceed) // { // flowStateSystem.UpdateTeaState(stateID,stateName); // } // else // { // MessageBox.Show("保存失败,请重试!", "系统信息!", MessageBoxButtons.OK, MessageBoxIcon.Error); // return; // } } MessageBox.Show("保存成功.", "系统信息!", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void simpleButton_SaveTea_Click(object sender, System.EventArgs e) { FlowStateSystem flowStateSystem = new FlowStateSystem(); for (int i = 0; i < gridView2.RowCount; i++) { Int16 stateID = (Int16)(Convert.ToInt16(gridView2.GetDataRow(i)["teafs_state"]) + 2); string stateName = gridView2.GetDataRow(i)["teafs_name"].ToString(); flowStateSystem.UpdateTeaState(stateID, stateName); } MessageBox.Show("保存成功.", "系统信息!", MessageBoxButtons.OK, MessageBoxIcon.Information); }