Ejemplo n.º 1
0
        private void tsBtnDel_Click(object sender, EventArgs e)
        {
            if (gridVProGroup.RowCount > 0)
            {
                int flag = 0;
                switch (cboSelect.Text.Trim())
                {
                case "单位":
                    flag = 1;
                    break;

                case "规格":
                    flag = 2;
                    break;

                case "封装":
                    flag = 3;
                    break;

                case "计价法":
                    flag = 4;
                    break;
                }
                DialogResult dr = MessageBox.Show("确定要删除所选择的记录吗", this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (dr == DialogResult.OK)
                {
                    string unitid = ((DataRowView)(gridVProGroup.GetFocusedRow())).Row[0].ToString();


                    BasicDataManage.DeleteBasicData(unitid);

                    loaddata();
                }
            }
        }
Ejemplo n.º 2
0
        private void tsBtnDel_Click(object sender, EventArgs e)
        {
            int flag = 0;

            if (gridVProGroup.RowCount > 0)
            {
                switch (listSelect.SelectedItem.ToString().Trim())
                {
                case "单位":
                    flag = 1;
                    break;

                case "币种":
                    flag = 2;
                    break;

                case "结算方式":
                    flag = 3;
                    break;

                case "车间":
                    flag = 4;
                    break;

                case "仓库":
                    flag = 5;
                    break;

                case "规格":
                    flag = 6;
                    break;

                case "计价方法":
                    flag = 7;
                    break;

                case "财务科目":
                    flag = 8;
                    break;

                case "模具类别":
                    flag = 12;
                    break;

                case "产品类别":
                    flag = 13;
                    break;
                }
                DialogResult dr = MessageBox.Show("确定要删除所选择的记录吗", this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (dr == DialogResult.OK)
                {
                    string unitid = ((DataRowView)(gridVProGroup.GetFocusedRow())).Row[0].ToString();


                    BasicDataManage.DeleteBasicData(unitid);

                    //写日志
                    SysLog.AddOperateLog(SysParams.UserName, "辅助数据删除", "删除", SysParams.UserName + "删除了flag=" + flag.ToString() + ",Guid为" + unitid + "的辅助数据");


                    loaddata();
                }
            }
        }