XDFZ/PowerManager.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using BLL;
using Model;
using CommonTools;

namespace XDFZ
{
    public partial class PowerManager : Form
    {
        public PowerManager()
        {
            InitializeComponent();
            this.radioButton1.Select();
        }

        private void PowerManager_Load(object sender, EventArgs e)
        {
            try
            {
                comBind();
                dataBind();
            }
            catch (Exception ex)
            {
                MessageBox.Show("系统异常!" + ex.Message);
            }
        }

        private void dataBind()
        {
            DataTable dt = CommonProxy.GetPowerList();
            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (dt.Rows[i]["Power"].ToString() == "1")
                    {
                        dt.Rows[i]["Power"] = "销售员";
                    }
                    if (dt.Rows[i]["Power"].ToString() == "2")
                    {
                        dt.Rows[i]["Power"] = "进货员";
                    }
                    if (dt.Rows[i]["Power"].ToString() == "3")
                    {
                        dt.Rows[i]["Power"] = "生产管理员";
                    }
                    if (dt.Rows[i]["Power"].ToString() == "4")
                    {
                        dt.Rows[i]["Power"] = "系统管理员";
                    }
                }
            }
            this.dataGridView1.DataSource = dt;
后面还有 80 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。