Exemple #1
0
        /// <summary>
        /// dataGridView单元按钮触发事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataGridView_OfferSheet_Audit_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "viewBtn")
            {
                //MessageBox.Show(dataGridView_OfferSheet.Rows[e.RowIndex].Cells["OFFERSHEET_CODE"].Value.ToString());
                string offersheet_id = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();
                viewOfferSheet(offersheet_id);
            }

            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "auditBtn")
            {
                //MessageBox.Show(dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString());
                string offersheet_id   = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();
                string offersheet_code = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["OFFERSHEET_CODE"].Value.ToString();
                FormOSM_OfferSheet_AuditBox offerSheetAuditBox = new FormOSM_OfferSheet_AuditBox();
                offerSheetAuditBox.setOfferSheetID(offersheet_id);
                offerSheetAuditBox.setOfferSheetCode(offersheet_code);
                offerSheetAuditBox.setMainForm(main_form);
                offerSheetAuditBox.StartPosition = FormStartPosition.CenterParent;
                offerSheetAuditBox.ShowDialog();
            }

            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "passBtn")
            {
                DialogResult result = MessageBox.Show("确定通过审核?", "提醒", MessageBoxButtons.OKCancel);
                if (result == DialogResult.OK)
                {
                    string offersheet_id   = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();
                    string offersheet_code = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["OFFERSHEET_CODE"].Value.ToString();

                    PassOfferSheet(offersheet_id, offersheet_code);
                }
            }

            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "failBtn")
            {
                DialogResult result = MessageBox.Show("确定审核不通过?", "提醒", MessageBoxButtons.OKCancel);
                if (result == DialogResult.OK)
                {
                    string offersheet_id = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();

                    FailOfferSheet(offersheet_id);
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// dataGridView单元按钮触发事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataGridView_OfferSheet_Audit_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "viewBtn")
            {
                //MessageBox.Show(dataGridView_OfferSheet.Rows[e.RowIndex].Cells["OFFERSHEET_CODE"].Value.ToString());
                string offersheet_id = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();
                viewOfferSheet(offersheet_id);
            }

            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "auditBtn")
            {
                //MessageBox.Show(dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString());
                string offersheet_id = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();
                string offersheet_code = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["OFFERSHEET_CODE"].Value.ToString();
                FormOSM_OfferSheet_AuditBox offerSheetAuditBox = new FormOSM_OfferSheet_AuditBox();
                offerSheetAuditBox.setOfferSheetID(offersheet_id);
                offerSheetAuditBox.setOfferSheetCode(offersheet_code);
                offerSheetAuditBox.setMainForm(main_form);
                offerSheetAuditBox.StartPosition = FormStartPosition.CenterParent;
                offerSheetAuditBox.ShowDialog();
            }

            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "passBtn")
            {
                DialogResult result = MessageBox.Show("确定通过审核?", "提醒", MessageBoxButtons.OKCancel);
                if (result == DialogResult.OK)
                {
                    string offersheet_id = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();
                    string offersheet_code = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["OFFERSHEET_CODE"].Value.ToString();

                    PassOfferSheet(offersheet_id, offersheet_code);
                }
            }

            if (dataGridView_OfferSheet_Audit.Columns[e.ColumnIndex].Name == "failBtn")
            {
                DialogResult result = MessageBox.Show("确定审核不通过?", "提醒", MessageBoxButtons.OKCancel);
                if (result == DialogResult.OK)
                {
                    string offersheet_id = dataGridView_OfferSheet_Audit.Rows[e.RowIndex].Cells["ID"].Value.ToString();

                    FailOfferSheet(offersheet_id);
                }
            }
        }