当前位置: 首页>>代码示例>>C#>>正文


C# IDBOperation.GetProvinceCity方法代码示例

本文整理汇总了C#中IDBOperation.GetProvinceCity方法的典型用法代码示例。如果您正苦于以下问题:C# IDBOperation.GetProvinceCity方法的具体用法?C# IDBOperation.GetProvinceCity怎么用?C# IDBOperation.GetProvinceCity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDBOperation的用法示例。


在下文中一共展示了IDBOperation.GetProvinceCity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MainWindow

        private Rect rcnormal;//定义一个全局rect记录还原状态下窗口的位置和大小。


        public MainWindow(IDBOperation dbOperation)
        {
            //Rect rc = SystemParameters.WorkArea;//获取工作区大小
            this.Width = 1366;
            this.Height = 766;
            InitializeComponent();
            this.dbOperation = dbOperation;
            UserInfo userInfo = Application.Current.Resources["User"] as UserInfo;
            this.userName = userInfo.ShowName;
            Application.Current.Resources.Add("省市表", dbOperation.GetProvinceCity());

            //加载标题
            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() + "版权所有    版本号:" + ConfigurationManager.AppSettings["version"] + "    技术服务热线:" + table.Rows[0][1].ToString();

            DataTable dt= dbOperation.GetDbHelper().GetDataSet(string.Format("SELECT INFO_NAME,image from sys_client_sysdept where INFO_CODE ='{0}'", (Application.Current.Resources["User"] as UserInfo).DepartmentID)).Tables[0];
            this._title_dept.Text = dt.Rows[0][0].ToString();
            if (dt.Rows[0][1].ToString() != null && dt.Rows[0][1].ToString() != "")
            {
                byte[] img = (byte[])dt.Rows[0][1];
                ShowSelectedIMG(img);                //以流的方式显示图片的方法
            }

            MainMenu_Load();
            this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);

            //加载主画面
            if (mainMenus[0].Flag_Exits == 1)
            {
                TabItem temptb = new TabItem();
                temptb.Header = "首页";
                temptb.Content = new UcMainPage();

                _tab.Items.Add(temptb);
                _tab.SelectedIndex = _tab.Items.Count - 1;
            }

            //if (!FullScreenHelper.IsFullscreen(this))
            //{
            //    FullScreenHelper.GoFullscreen(this);
            //}
            //this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
            //this.KeyDown += new KeyEventHandler(MainWindow_KeyDown);
            //this.StateChanged += new EventHandler(MainWindow_StateChanged);
        }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:52,代码来源:MainWindow.xaml.cs

示例2: MainWindowTradition

        public MainWindowTradition(IDBOperation dbOperation)
        {
            InitializeComponent();

            this.dbOperation = dbOperation;
            dbHelper = DbHelperMySQL.CreateDbHelper();

            //系统标题的显示
            string sql = string.Format("select title from sys_client_sysdept where INFO_CODE = '{0}'", (Application.Current.Resources["User"] as UserInfo).DepartmentID);
            string title = dbOperation.GetDbHelper().GetSingle(sql).ToString();

            this.Title = title + "              "+"当前登录用户:" + (Application.Current.Resources["User"] as UserInfo).ShowName;

            Application.Current.Resources.Add("省市表", dbOperation.GetProvinceCity());
            MenuRole();
            foreach (FatherMenuTitle fatherMenuTitle in menuTitles)
            {
                MenuItem fatherMenu = new MenuItem();
                fatherMenu.FontSize = 16;
                fatherMenu.Header = fatherMenuTitle.Name;
                if (fatherMenuTitle.ChildMenuTitle.Count == 0)
                {
                    fatherMenu.Click += new RoutedEventHandler(childMenu_Click);
                }
                else
                {
                    foreach (string childMenuTitle in fatherMenuTitle.ChildMenuTitle)
                    {
                        MenuItem childMenu = new MenuItem();
                        childMenu.FontSize = 16;
                        childMenu.Header = childMenuTitle;
                        childMenu.Click += new RoutedEventHandler(childMenu_Click);
                        fatherMenu.Items.Add(childMenu);
                    }
                }
                _menu.Items.Add(fatherMenu);
            }

            mainPage = new UcMainPage();
            grid_Component.Children.Add(mainPage);

            this.WindowState = WindowState.Maximized;
        }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:43,代码来源:MainWindowTradition.xaml.cs


注:本文中的IDBOperation.GetProvinceCity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。