Ejemplo n.º 1
0
        /// <summary>
        /// 停用
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsmDisable_Click(object sender, EventArgs e)
        {
            //获取选中的整行数据
            Model_Customer editCustomer = dataGridView1.SelectedRows[0].Tag as Model_Customer;

            editCustomer.Activedk__BackingField = Enum_Active.Disable;
            try
            {
                ResultModelOfModel_Customerd4FqxSXX customer = cs.EditCustomer(editCustomer);
                if (customer.Code != 0)
                {
                    MessageBox.Show(customer.Message);
                }
                else
                {
                    MessageBox.Show("操作成功");
                    //customerLoad();
                    AvGue();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }