示例#1
0
        private void btnLoad_Click(object sender, RoutedEventArgs e)
        {
            LoadWindow loadWindow = new LoadWindow();

            this.Close();
            loadWindow.Show();
        }
示例#2
0
        void timer_Tick(object sender, EventArgs e)
        {
            if (flag == 0)
            {
                LoadWindow load = new LoadWindow();
                load.Show();

                Application.Current.Resources.Add("省市表", dbOperation.GetProvinceCity());
                UserInfo userInfo = Application.Current.Resources["User"] as UserInfo;
                this.userName = userInfo.ShowName;

                //加载标题
                this._user.Text = this.userName;
                //this._date.Text = DateTime.Now.ToLongDateString().ToString() +  DateTime.Now.ToString("dddd");
                this._date.Text = DateTime.Now.ToLongDateString().ToString();

                DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("select companyName,phone from t_supplier where supplierId ='{0}'", (Application.Current.Resources["User"] as UserInfo).SupplierId == "" ? "zrd" : (Application.Current.Resources["User"] as UserInfo).SupplierId)).Tables[0];
                this._bottom.Text = "版权所有:" + table.Rows[0][0].ToString() + "  软著登字第0814101号    版本号:" + ConfigurationManager.AppSettings["version"] + "    技术服务热线:" + table.Rows[0][1].ToString();

                //DataTable dt = dbOperation.GetDbHelper().GetDataSet(string.Format("SELECT title,image from sys_client_sysdept where INFO_CODE ='{0}'", (Application.Current.Resources["User"] as UserInfo).DepartmentID)).Tables[0];
                string dept_str = "";
                if (deptId.Length >= 3)
                {
                    dept_str = deptId.Substring(0, 3).ToString();
                }
                else
                {
                    dept_str = deptId;
                }

                DataTable dt = dbOperation.GetDbHelper().GetDataSet(string.Format("SELECT title,image,INFO_NAME from sys_client_sysdept where INFO_CODE ='{0}'", dept_str)).Tables[0];
                if (dt.Rows[0][0].ToString() != "")
                {
                    this._title_dept.Text = dt.Rows[0][0].ToString();
                }
                else if (dt.Rows[0][2].ToString() != "")
                {
                    this._title_dept.Text = dt.Rows[0][2].ToString();
                }

                if (dt.Rows[0][1].ToString() != null && dt.Rows[0][1].ToString() != "")
                {
                    byte[] img = (byte[])dt.Rows[0][1];
                    ShowSelectedIMG(img);                //以流的方式显示图片的方法
                }

                this._logo.Visibility    = Visibility.Visible;
                this._title_1.Visibility = Visibility.Visible;
                //this._title_2.Visibility = Visibility.Visible;

                //加载父菜单和子菜单和首页
                MainMenu_Load();
                this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);

                flag           = 1;
                timer.Interval = new TimeSpan(1000);
                load.Close();
            }
            //header.UpdateTime();
        }
        private void ChangeDB()
        {
            if (!MessageBoxFactory.ShowConfirmAsBool("Are you sure you want to close the current database?", "Close Database?", MessageBoxImage.Asterisk))
            {
                return;
            }

            Workspace.Unload();

            LoadWindow loader = new LoadWindow();

            loader.Show();

            window.Close();
        }
示例#4
0
        void timer_Tick(object sender, EventArgs e)
        {
            if (flag == 0)
            {
                LoadWindow load = new LoadWindow();
                load.Show();

                Application.Current.Resources.Add("省市表", operationService.GetProvinceCity());
                PubClass.ProvinceCityTable = Application.Current.Resources["省市表"] as DataTable;

                UserInfo userInfo = Application.Current.Resources["User"] as UserInfo;
                this.userName = userInfo.ShowName;

                //加载标题
                this._user.Text = this.userName;
                this._date.Text = DateTime.Now.ToLongDateString().ToString();
                DataTable table = operationService.GetUserSupplier(PubClass.supplierid);

                this._bottom.Text = "版权所有:" + table.Rows[0][0].ToString() + "  软著登字第0814101号    版本号:" + ConfigurationManager.AppSettings["version"] + "    技术服务热线:" + table.Rows[0][1].ToString();

                string dept_str = "";
                if (deptId.Length >= 3)
                {
                    dept_str = deptId.Substring(0, 3).ToString();
                }
                else
                {
                    dept_str = deptId;
                }

                this._title.Visibility = Visibility.Visible;

                //加载父菜单和子菜单和首页
                MainMenu_Load();
                this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);

                flag           = 1;
                timer.Interval = new TimeSpan(1000);
                load.Close();
            }
            //header.UpdateTime();
        }
示例#5
0
        private void load()
        {
            LoadWindow load = new LoadWindow(this);

            load.Show();
        }
示例#6
0
 protected override void Run(Player player)
 {
     LoadWindow.Show();
 }