示例#1
0
文件: MainFrm.cs 项目: jimesking/SCSM
        public void InitMainFrm()
        {
            this.title.Location = new System.Drawing.Point(this.Width / 2 - this.title.Width / 2, this.menuStrip1.Height);

            if (user != null)
            {
                if (user.Role == 1)
                {
                    this.menuStrip1.Items.Add("用户管理", null, delegate(object sender, EventArgs e)
                    {
                        UserManageFrm usFrm = new UserManageFrm();
                        usFrm.Show();
                    });
                    this.menuStrip1.Items.Add("站点配置", null, (object sender, EventArgs e) => {
                        StationConfigFrm scFrm = new StationConfigFrm(this);
                        scFrm.Show();
                    });
                }

                UiInformationBLL uiBll = new UiInformationBLL(new UiInformationDAL());

                List <UIInfomation> uiInfos = uiBll.GetUiInformationsByUser(user);
                if (uiInfos.Count > 0)
                {
                    this.Text       = uiInfos[0].Caption;
                    this.title.Text = uiInfos[0].Title;
                }

                List <Station> stations = new List <Station>();

                StationBLL stationBLl = new StationBLL(new StationsDAL());

                stations = stationBLl.GetStationsByUser(this.User);

                ShowStation(stations);
            }
        }
示例#2
0
 public AddStationFrm(StationConfigFrm parentForm)
 {
     this.parentForm = parentForm;
     InitializeComponent();
 }