void Init() { this.SecondOrderCollections = new List <GroupOrderSecondRender>(); this.IsFirstLoad = true; _userMethodCheckBox = new OrderCheckBox(); _userMethodCheckBox.ValueTextChanged += _userMethodCheckBox_ValueTextChanged; this.AddRender(_userMethodCheckBox); _comboBox = new OrderComboBox(); _comboBox.GotFocus += new EventHandler(_comboBox_GotFocus); this.AddRender(_comboBox); _userDaysTextBox = new OrderTextUnit(); _userDaysTextBox.IsOnlyNum = true; _userDaysTextBox.GotFocus += new EventHandler(_comboBox_GotFocus); this.AddRender(_userDaysTextBox); //执行科室先不显示 _excuteDepartment = new OrderLabel(); _excuteDepartment.IsSuitScreenRelative = true; _excuteDepartment.Format = new StringFormat() { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Center }; this.AddRender(_excuteDepartment); this._userMethodCheckBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(_userMethodCheckBox_MouseDoubleClick); }
public SuppliesUC() { InitializeComponent(); List <TradePoint> tradePointsList = TradePointsController.GetInstance().GetTradePoints(); tradePointsList.Sort((x, y) => x.FullName.CompareTo(y.FullName)); TradePoints = new ObservableCollection <TradePoint>(tradePointsList); Binding bind1 = new Binding(); bind1.Source = TradePoints; TradePointComboBox.DisplayMemberPath = "FullName"; TradePointComboBox.SetBinding(ComboBox.ItemsSourceProperty, bind1); TradePoint = TradePoints.FirstOrDefault(); TradePointComboBox.SelectedItem = TradePoint; List <Product> productsList = ProductsController.GetInstance().GetProducts(); Products = new ObservableCollection <Product>(productsList); Binding bind2 = new Binding(); bind2.Source = Products; ProductComboBox.DisplayMemberPath = "Name"; ProductComboBox.SetBinding(ComboBox.ItemsSourceProperty, bind2); Product = Products.FirstOrDefault(); ProductComboBox.SelectedItem = Product; List <Supplier> suppliersList = SuppliersController.GetInstance().GetSuppliers(); Suppliers = new ObservableCollection <Supplier>(suppliersList); Binding bind3 = new Binding(); bind3.Source = Suppliers; SupplierComboBox.DisplayMemberPath = "Name"; SupplierComboBox.SetBinding(ComboBox.ItemsSourceProperty, bind3); Supplier = Suppliers.FirstOrDefault(); SupplierComboBox.SelectedItem = Supplier; List <Order> ordersList = OrdersController.GetInstance().GetOrders(); Orders = new ObservableCollection <Order>(ordersList); Binding bind4 = new Binding(); bind4.Source = Orders; OrderComboBox.DisplayMemberPath = "Id"; OrderComboBox.SetBinding(ComboBox.ItemsSourceProperty, bind4); Order = Orders.FirstOrDefault(); OrderComboBox.SelectedItem = Order; }
void Init() { _userMethod = new OrderLabel(); _userMethod.IsSuitScreenRelative = true; this.AddRender(_userMethod); _comboBox = new OrderComboBox(); _comboBox.GotFocus += _comboBox_GotFocus; this.AddRender(_comboBox); _userDaysTextBox = new OrderTextUnit(); _userDaysTextBox.GotFocus += _comboBox_GotFocus; _userDaysTextBox.IsOnlyNum = true; this.AddRender(_userDaysTextBox); //执行科室先不显示 _excuteDepartment = new OrderLabel(); _excuteDepartment.IsSuitScreenRelative = true; this.AddRender(_excuteDepartment); }
void Init() { this.SecondOrderCollections = new List <ChineseComplexSecondOrder>(); this.IsFirstLoad = true; _medicalNameCheckBox = new OrderCheckBox(); _medicalNameCheckBox.ValueTextChanged += _userMethodCheckBox_ValueTextChanged; this.AddRender(_medicalNameCheckBox); _useNum = new OrderTextUnit(); _useNum.GotFocus += new EventHandler(_userMethod_GotFocus); this.AddRender(_useNum); _userMethod = new OrderLabel(); _userMethod.IsSuitScreenRelative = true; this.AddRender(_userMethod); _comboBox = new OrderComboBox(); _comboBox.GotFocus += new EventHandler(_userMethod_GotFocus); this.AddRender(_comboBox); _userMethod1 = new OrderLabel(); _userMethod.IsSuitScreenRelative = true; this.AddRender(_userMethod1); //执行科室先不显示 _excuteDepartment = new OrderLabel(); _excuteDepartment.IsSuitScreenRelative = true; _excuteDepartment.Format = new StringFormat() { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Center }; this.AddRender(_excuteDepartment); this._medicalNameCheckBox.MouseDoubleClick += new MouseEventHandler(_medicalNameCheckBox_MouseDoubleClick); }