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


C# IDBOperation.GetDbHelper方法代码示例

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


在下文中一共展示了IDBOperation.GetDbHelper方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: detectdetails

        public detectdetails(IDBOperation dbOperation,int id)
        {
            InitializeComponent();

            this.dbOperation = dbOperation;

            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_detect_details('{0}')",id)).Tables[0];

            //给画面上的控件赋值
            //图片地址改为从数据库中获取
            string picture_url = dbOperation.GetDbHelper().GetSingle("select pictureurl from t_url ").ToString();
            if (picture_url == "")
            {
                picture_url = "http://www.zrodo.com:8080/xmjc/";
            }
            _img.Source = new BitmapImage(new Uri(picture_url + table.Rows[0][20].ToString()));
            //_img.Source = new BitmapImage(new Uri("http://www.zrodo.com:8080/xmjc/" + table.Rows[0][20].ToString()));
            _orderid.Text = table.Rows[0][18].ToString();
            _areaName.Text = table.Rows[0][10].ToString();
            _companyName.Text = table.Rows[0][11].ToString();
            _cardId.Text = table.Rows[0][12].ToString();
            _objectLable.Text = table.Rows[0][21].ToString();
            _objectCount.Text = table.Rows[0][22].ToString();
            _itemName.Text = table.Rows[0][3].ToString();
            _objectName.Text = table.Rows[0][4].ToString();
            _sampleName.Text = table.Rows[0][5].ToString();
            _reangetName.Text = table.Rows[0][7].ToString();
            _sensitivityName.Text = table.Rows[0][6].ToString();
            _resultName.Text = table.Rows[0][8].ToString();
            _deptName.Text = table.Rows[0][2].ToString();
            _detectDate.Text = table.Rows[0][1].ToString();
            _detectUserName.Text = table.Rows[0][9].ToString();
            _detectTypeName.Text = table.Rows[0][0].ToString();
            _cardbrand.Text = table.Rows[0][23].ToString();
            _cardno.Text = table.Rows[0][24].ToString();
            _detecthuanjie.Text = table.Rows[0][26].ToString();
            _detectnumber.Text = table.Rows[0][27].ToString();

            //检测结果为疑似阳性变红
            if (_resultName.Text == "疑似阳性" || _resultName.Text == "确证阳性")
            {
                _resultName.Foreground = Brushes.Red;
            }
            else
            {
                _resultName.Foreground = Brushes.Black;
            }
        }
开发者ID:wuqiangqiang,项目名称:lnxcp,代码行数:48,代码来源:detectdetails.xaml.cs

示例3: detectdetails

        public detectdetails(IDBOperation dbOperation,int id)
        {
            InitializeComponent();

            this.dbOperation = dbOperation;

            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_detect_details('{0}')",id)).Tables[0];

            //给画面上的控件赋值
            _areaName.Text = table.Rows[0][10].ToString();
            _companyName.Text = table.Rows[0][11].ToString();
            _cardId.Text = table.Rows[0][12].ToString();
            _itemName.Text = table.Rows[0][3].ToString();
            _objectName.Text = table.Rows[0][4].ToString();
            _sampleName.Text = table.Rows[0][5].ToString();
            _reangetName.Text = table.Rows[0][7].ToString();
            _sensitivityName.Text = table.Rows[0][6].ToString();
            _resultName.Text = table.Rows[0][8].ToString();
            _deptName.Text = table.Rows[0][2].ToString();
            _detectDate.Text = table.Rows[0][1].ToString();
            _detectUserName.Text = table.Rows[0][9].ToString();
            _detectTypeName.Text = table.Rows[0][0].ToString();

            
        }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:25,代码来源:detectdetails.xaml.cs

示例4: SysTrendAnalysis

        public SysTrendAnalysis(IDBOperation dbOperation)
        {
            InitializeComponent();
            this.dbOperation = dbOperation;
            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_year_count({0})", (Application.Current.Resources["User"] as UserInfo).ID)).Tables[0];
            List<string> years = new List<string>();
            years.Add("-请选择-");
            for (int i = 0; i < table.Rows.Count; i++)
            {
                years.Add(table.Rows[i][0].ToString());
            }

            _year.ItemsSource = years;
            _year.SelectedIndex = 0;

            List<string> analysisThemes = new List<string>();
            analysisThemes.Add("-请选择-");
            analysisThemes.Add("年度各项目检测执行趋势分析");
            analysisThemes.Add("年度各检测项目阳性样本检出趋势分析");
            analysisThemes.Add("年度各检测项目疑似阳性样本检出趋势分析");
            _analysis_theme.ItemsSource = analysisThemes;
            _analysis_theme.SelectedIndex = 0;

            this.SizeChanged += new SizeChangedEventHandler(SysTrendAnalysis_SizeChanged);
            _chart.SizeChanged += new SizeChangedEventHandler(_chart_SizeChanged);
        }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:26,代码来源:SysTrendAnalysis.xaml.cs

示例5: detectDetailsReview

        public detectDetailsReview(IDBOperation dbOperation, int id)
        {
            InitializeComponent();

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

            orderid = id;

            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_detect_details('{0}')", id)).Tables[0];

            //给画面上的控件赋值
            _areaName.Text = table.Rows[0][10].ToString();
            _companyName.Text = table.Rows[0][11].ToString();
            _cardId.Text = table.Rows[0][12].ToString();
            _itemName.Text = table.Rows[0][3].ToString();
            _objectName.Text = table.Rows[0][4].ToString();
            _sampleName.Text = table.Rows[0][5].ToString();
            _reagentName.Text = table.Rows[0][7].ToString();
            _sensitivityName.Text = table.Rows[0][6].ToString();
            _resultName.Text = table.Rows[0][8].ToString();
            _deptName.Text = table.Rows[0][2].ToString();
            _detectDate.Text = table.Rows[0][1].ToString();
            _detectUserName.Text = table.Rows[0][9].ToString();
            _detectTypeName.Text = table.Rows[0][0].ToString();
            _reviewBz.Text = table.Rows[0][19].ToString();
            _reviewUserid.Text = table.Rows[0][14].ToString();
            _reviewReagent_text.Text = table.Rows[0][15].ToString();
            _reviewResult_text.Text = table.Rows[0][16].ToString();
            _reviewDate.Text = table.Rows[0][17].ToString();
        }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:31,代码来源:detectDetailsReview.xaml.cs

示例6: CertificateProductPreview

        public CertificateProductPreview(IDBOperation dbOperation, string card_id)
        {
            InitializeComponent();
            this.dbOperation = dbOperation;
            this.cardId = card_id;

            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_certificate_product_main('{0}')", cardId)).Tables[0];
            if (table.Rows.Count > 0)
            {
                _card_id.Text = table.Rows[0][0].ToString();
                _company.Text = table.Rows[0][2].ToString();
                _product_name.Text = table.Rows[0][4].ToString();
                _object_count.Text = table.Rows[0][5].ToString();
                _cz_cardid.Text = table.Rows[0][3].ToString();
                _product_area.Text = table.Rows[0][6].ToString();
                _dept_name.Text = table.Rows[0][7].ToString() + "              " + table.Rows[0][8].ToString();
                _mdd.Text = table.Rows[0][9].ToString();
                _bz.Text = table.Rows[0][10].ToString();
                _user_name.Text = table.Rows[0][11].ToString();
                _user_id.Text = table.Rows[0][15].ToString();
                _nian.Text = ConvertStr.convert_nian(table.Rows[0][12].ToString());
                _yue.Text = ConvertStr.convert_yue(table.Rows[0][13].ToString());
                _day.Text = ConvertStr.convert_day(table.Rows[0][14].ToString());
            }
        }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:25,代码来源:CertificateProductPreview.xaml.cs

示例7: SysDeptManager

        public SysDeptManager(IDBOperation dbOperation)
        {
            InitializeComponent();
            this.dbOperation = dbOperation;
            ProvinceCityTable = System.Windows.Application.Current.Resources["省市表"] as System.Data.DataTable;
            user_flag_tier = (System.Windows.Application.Current.Resources["User"] as UserInfo).FlagTier.ToString();
            SupplierTable = dbOperation.GetDbHelper().GetDataSet("select supplierId,supplierName from t_supplier").Tables[0];
            //赋值所在地下拉选择框
            ComboboxTool.InitComboboxSource(_lower_provice, GetRows("0001"), "lr");
            _lower_provice.SelectionChanged += new SelectionChangedEventHandler(_province_SelectionChanged);
            //赋值供应商下拉选择框
            ComboboxTool.InitComboboxSource(_Supplier, "select supplierId,supplierName from t_supplier", "lr");
            //赋值部门级别下拉选择框
            dt_level.Columns.Add(new DataColumn("levelid"));
            dt_level.Columns.Add(new DataColumn("levelname"));
            var row2 = dt_level.NewRow();
            row2["levelid"] = "1";
            row2["levelname"] = "省级";
            dt_level.Rows.Add(row2);
            var row3 = dt_level.NewRow();
            row3["levelid"] = "2";
            row3["levelname"] = "市(州)";
            dt_level.Rows.Add(row3);
            var row4 = dt_level.NewRow();
            row4["levelid"] = "3";
            row4["levelname"] = "区县";
            dt_level.Rows.Add(row4);
            var row5 = dt_level.NewRow();
            row5["levelid"] = "4";
            row5["levelname"] = "检测单位";
            dt_level.Rows.Add(row5);
            ComboboxTool.InitComboboxSource(_level, dt_level, "lr");

            InitUserControlUI();
        }
开发者ID:wuqiangqiang,项目名称:lnxcp,代码行数:35,代码来源:SysDeptManager.xaml.cs

示例8: CertificatePreview

        public CertificatePreview(IDBOperation dbOperation,string card_id)
        {
            InitializeComponent();
            this.dbOperation = dbOperation;
            this.cardId = card_id;

            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_certificate_main('{0}')", cardId)).Tables[0];
            if (table.Rows.Count > 0)
            {
                _card_id.Text = table.Rows[0][0].ToString();
                _company.Text = table.Rows[0][2].ToString();
                _phone.Text = table.Rows[0][6].ToString();
                _detect_object.Text = table.Rows[0][4].ToString();
                _object_count.Text = table.Rows[0][5].ToString();
                _for_use.Text = table.Rows[0][7].ToString();
                _city_ks.Text = table.Rows[0][8].ToString();
                _region_ks.Text= table.Rows[0][9].ToString();
                _town_ks.Text= table.Rows[0][10].ToString();
                _village_ks.Text = table.Rows[0][11].ToString();
                _city_js.Text = table.Rows[0][12].ToString();
                _region_js.Text = table.Rows[0][13].ToString();
                _town_js.Text = table.Rows[0][14].ToString();
                _village_js.Text = table.Rows[0][15].ToString();
                _object_lable.Text = table.Rows[0][16].ToString();
                _user_name.Text = table.Rows[0][17].ToString();
                _user_id.Text = table.Rows[0][21].ToString();
                _nian.Text = ConvertStr.convert_nian(table.Rows[0][18].ToString());
                _yue.Text = ConvertStr.convert_yue(table.Rows[0][19].ToString());
                _day.Text = ConvertStr.convert_day(table.Rows[0][20].ToString());
            }
        }
开发者ID:wuqiangqiang,项目名称:lnxcp,代码行数:31,代码来源:CertificatePreview.xaml.cs

示例9: SysQuarterAnalysis

            "第四季度"};//初始化变量

        public SysQuarterAnalysis(IDBOperation dbOperation)
        {

            InitializeComponent();
            this.dbOperation = dbOperation;
            user_id = (Application.Current.Resources["User"] as UserInfo).ID.ToString();

            _year.ItemsSource = year;
            for (int i = 0; i < _year.Items.Count; i++)
            {
                if (_year.Items[i].ToString() == DateTime.Now.Year.ToString())

                {
                    _year.SelectedItem = _year.Items[i];
                    break;
                }
            }

            _month.ItemsSource = month;
            _month.SelectedIndex = 2;

            ComboboxTool.InitComboboxSource(_detect_huanjie, "SELECT id,name FROM t_liaoning_huanjie", "cxtj");

            //地址从数据库中获取
            page_url = dbOperation.GetDbHelper().GetSingle("select quarterreport from t_url ").ToString();
            if (page_url == null)
            {
                page_url = "";
            }
        }
开发者ID:wuqiangqiang,项目名称:lnxcp,代码行数:32,代码来源:SysQuarterAnalysis.xaml.cs

示例10: detectdetails

        public detectdetails(IDBOperation dbOperation,int id)
        {
            InitializeComponent();

            this.dbOperation = dbOperation;

            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_detect_details_sc('{0}')",id)).Tables[0];

            //给画面上的控件赋值
            _orderid.Text = table.Rows[0][15].ToString();
            _areaName.Text = table.Rows[0][8].ToString();
            _companyName.Text = table.Rows[0][9].ToString();
            _itemName.Text = table.Rows[0][3].ToString();
            _objectName.Text = table.Rows[0][4].ToString();
            _reangetName.Text = table.Rows[0][5].ToString();
            _resultName.Text = table.Rows[0][6].ToString();
            _deptName.Text = table.Rows[0][2].ToString();
            _detectDate.Text = table.Rows[0][1].ToString();
            _detectUserName.Text = table.Rows[0][7].ToString();
            _detectTypeName.Text = table.Rows[0][0].ToString();
            _detectvalue.Text = table.Rows[0][18].ToString();

            //检测结果为疑似阳性变红
            if (_resultName.Text == "疑似阳性" || _resultName.Text == "确证阳性")
            {
                _resultName.Foreground = Brushes.Red;
            }
            else
            {
                _resultName.Foreground = Brushes.Black;
            }
        }
开发者ID:wuqiangqiang,项目名称:dcs,代码行数:32,代码来源:detectdetails.xaml.cs

示例11: UcQuarantineRecord

        public UcQuarantineRecord(IDBOperation dbOperation)
        {
            InitializeComponent();
            this.dbOperation = dbOperation;

            //检疫员所属部门货主信息flag,屠宰场名称,检疫分站名称
            DataTable table = dbOperation.GetDbHelper().GetDataSet("select ifnull(a.shipperflag,'') as shipperflag, " +
                                    " tzcname,INFO_NAME" +
                                    " from sys_client_sysdept a " +
                                    " where INFO_CODE = " + deptId).Tables[0];

            if (table.Rows.Count != 0)
            {
                shipperflag = table.Rows[0][0].ToString();
                _detect_site.Text = table.Rows[0][2].ToString();
                _slaughter_site.Text = table.Rows[0][1].ToString();
            }
            //申报人姓名
            ComboboxTool.InitComboboxSource(_shipper_name, string.Format("SELECT sbrid,sbrname FROM t_record_sbr WHERE openflag = '1' and createdeptid = '{0}'", deptId), "lr");
            //产地
            ComboboxTool.InitComboboxSource(_address, string.Format("SELECT areaid,areaname FROM t_record_area WHERE openflag = '1' and createdeptid = '{0}'", deptId), "lr");
            //协检员
            ComboboxTool.InitComboboxSource(_help_user, string.Format("call p_user_helpuser({0})", userId), "lr");
            //官方兽医姓名
            _user_name.Text = username;
            //录入时间
            _entering_datetime.Text = string.Format("{0:g}", System.DateTime.Now);
            //屠宰动物种类
            ComboboxTool.InitComboboxSource(_animal, "SELECT animalid,animalname FROM t_animal_new WHERE openflag = '1' and deptflag = '" + shipperflag + "'", "lr");
            _animal.SelectionChanged += new SelectionChangedEventHandler(_animal_SelectionChanged);
            _animal.SelectedIndex = 1;
            //临床情况
            DataTable dt_quater = new DataTable();
            dt_quater.Columns.Add(new DataColumn("quaterid"));
            dt_quater.Columns.Add(new DataColumn("quatername"));
            var row = dt_quater.NewRow();
            row["quaterid"] = "0";
            row["quatername"] = "良好";
            dt_quater.Rows.Add(row);
            var row2 = dt_quater.NewRow();
            row2["quaterid"] = "1";
            row2["quatername"] = "异常";
            dt_quater.Rows.Add(row2);
            ComboboxTool.InitComboboxSource(_quater, dt_quater, "lr");

            //是否佩戴规定的畜禽标识
            DataTable dt_object_flag = new DataTable();
            dt_object_flag.Columns.Add(new DataColumn("flagid"));
            dt_object_flag.Columns.Add(new DataColumn("flagname"));
            var row3 = dt_object_flag.NewRow();
            row3["flagid"] = "1";
            row3["flagname"] = "是";
            dt_object_flag.Rows.Add(row3);
            var row4 = dt_object_flag.NewRow();
            row4["flagid"] = "0";
            row4["flagname"] = "否";
            dt_object_flag.Rows.Add(row4);
            ComboboxTool.InitComboboxSource(_object_flag, dt_object_flag, "lr");

        }
开发者ID:wuqiangqiang,项目名称:lnxcp,代码行数:60,代码来源:UcQuarantineRecord.xaml.cs

示例12: AddReviewDetails

        public AddReviewDetails(IDBOperation dbOperation, int id,SysReviewInfo sysreviewinfo)
        {
            InitializeComponent();

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

            orderid = id;

            string reviewflag = dbHelper.GetSingle(string.Format("select ReviewFlag from t_detect_report where ORDERID = '{0}'", id)).ToString();
            DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_detect_details('{0}')", id)).Tables[0];

            //给画面上的控件赋值
            _areaName.Text = table.Rows[0][10].ToString();
            _companyName.Text = table.Rows[0][11].ToString();
            _cardId.Text = table.Rows[0][12].ToString();
            _itemName.Text = table.Rows[0][3].ToString();
            _objectName.Text = table.Rows[0][4].ToString();
            _sampleName.Text = table.Rows[0][5].ToString();
            _reagentName.Text = table.Rows[0][7].ToString();
            _sensitivityName.Text = table.Rows[0][6].ToString();
            _resultName.Text = table.Rows[0][8].ToString();
            _deptName.Text = table.Rows[0][2].ToString();
            _detectDate.Text = table.Rows[0][1].ToString();
            _detectUserName.Text = table.Rows[0][9].ToString();
            _detectTypeName.Text = table.Rows[0][0].ToString();


            if (reviewflag == "1")
            {
                _reviewUserid.Text = table.Rows[0][14].ToString();
                _reviewReagent_text.Text = table.Rows[0][15].ToString();
                _reviewResult_text.Text = table.Rows[0][16].ToString();
                _reviewDate.Text = table.Rows[0][17].ToString();
                _reviewBz.Text = table.Rows[0][19].ToString();
                btnSave.Visibility = Visibility.Hidden;
                _reviewReagent.Visibility = Visibility.Hidden;
                _reviewResult.Visibility = Visibility.Hidden;
                _reviewReagent_text.Visibility = Visibility.Visible;
                _reviewResult_text.Visibility = Visibility.Visible;
                _reviewBz.IsEnabled = false;

            }
            else
            {
                _reviewUserid.Text = (Application.Current.Resources["User"] as UserInfo).ShowName;
                _reviewDate.Text = DateTime.Now.ToString();
                ComboboxTool.InitComboboxSource(_reviewResult, "SELECT resultId,resultName FROM t_det_result where openFlag = '1' ORDER BY id", "lr");
                ComboboxTool.InitComboboxSource(_reviewReagent, "select reagentId,reagentName from t_det_reagent where openFlag = '1' and reagentId <> '1'", "lr");

                btnSave.Visibility = Visibility.Visible;
                _reviewReagent.Visibility = Visibility.Visible;
                _reviewResult.Visibility = Visibility.Visible;
                _reviewReagent_text.Visibility = Visibility.Hidden;
                _reviewResult_text.Visibility = Visibility.Hidden;
                _reviewBz.IsEnabled = true;
            }

        }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:60,代码来源:AddReviewDetails.xaml.cs

示例13: AddShipper

 public AddShipper(IDBOperation dbOperation,string shipperflag)
 {
     InitializeComponent();
     this.dbOperation = dbOperation;
     this.shipperFlag = shipperflag;
     this._id.Text = dbOperation.GetDbHelper().GetSingle(string.Format("select f_create_shipper('{0}')", shipperFlag)).ToString();
    
 }
开发者ID:wuqiangqiang,项目名称:lnxcp,代码行数:8,代码来源:AddShipper.xaml.cs

示例14: SysDeptManager

 public SysDeptManager(IDBOperation dbOperation)
 {
     InitializeComponent();
     this.dbOperation = dbOperation;
     ProvinceCityTable = System.Windows.Application.Current.Resources["省市表"] as System.Data.DataTable;
     user_flag_tier = (System.Windows.Application.Current.Resources["User"] as UserInfo).FlagTier.ToString();
     SupplierTable = dbOperation.GetDbHelper().GetDataSet("select supplierId,supplierName from t_supplier").Tables[0];
     InitUserControlUI();
 }
开发者ID:wuqiangqiang,项目名称:easyfood,代码行数:9,代码来源:SysDeptManager.xaml.cs

示例15: UcCreateCertificate

        public UcCreateCertificate(IDBOperation dbOperation)
        {
            InitializeComponent();
            this.dbOperation = dbOperation;

            _user_name.Text = username;
            _user_id.Text = loginid;
            _nian.Text = ConvertStr.convert_nian(DateTime.Now.Year.ToString());
            _yue.Text = ConvertStr.convert_yue(DateTime.Now.Month.ToString());
            _day.Text = ConvertStr.convert_day(DateTime.Now.Day.ToString());

            //出证人所属的市级单位,及出证人所属部门货主信息flag,赋值启运地点
            DataTable table = dbOperation.GetDbHelper().GetDataSet("select sys_city.name as city,ifnull(a.shipperflag,'') as shipperflag," +
                                    " tzcname,tzcarea,tzcaddress" +
                                    " from sys_client_sysdept a LEFT JOIN sys_city ON a.city = sys_city.id" +
                                    " where INFO_CODE = " + deptId).Tables[0];
            if(table.Rows.Count != 0)
            {
                cityname = table.Rows[0][0].ToString();
                shipperflag = table.Rows[0][1].ToString();

                string tzcarea = table.Rows[0][3].ToString();

                _city_ks.Text = tzcarea.Substring(0,2).ToString();
                _region_ks.Text = tzcarea.Substring(3, 3).ToString();
                //_town_ks.Text = table.Rows[0][4].ToString();
                _village_ks.Text = table.Rows[0][2].ToString();
            }            

            //检疫证号
            string card_id = dbOperation.GetDbHelper().GetSingle(string.Format("select f_get_cardid('{0}')", deptId)).ToString();
            _card_id.Text = card_id;
            //协检员
            ComboboxTool.InitComboboxSource(_help_user, string.Format("call p_user_helpuser({0})", userId), "lr");
            //动物种类
            ComboboxTool.InitComboboxSource(_object_id, "SELECT animalid,animalname FROM t_animal_new WHERE openflag = '1' and deptflag = '" + shipperflag + "'", "lr");
            _object_id.SelectionChanged += new SelectionChangedEventHandler(_object_id_SelectionChanged);
            _object_id.SelectedIndex = 1;
            //用途
            ComboboxTool.InitComboboxSource(_for_use, "SELECT useid,usename FROM t_for_use WHERE openflag = '1'", "lr");
            _for_use.SelectedIndex = 1;
        }
开发者ID:wuqiangqiang,项目名称:lnxcp,代码行数:42,代码来源:UcCreateCertificate.xaml.cs


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