private void ShiftsXtraForm_Load(object sender, EventArgs e) { m_Shift = new ShiftsBLL(); CheckPermissions(); shiftGridColumn.FieldName = "ShiftName"; idGridColumn.FieldName = "ShiftID"; BindGridControl(); }
private void ProductionXtraForm_Load(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; m_ProductionSession = new Session(MyDataLayers.SPGDataLayer) { TrackPropertiesModifications = true, OptimisticLockingReadBehavior = OptimisticLockingReadBehavior.MergeCollisionThrowException }; CheckPermissions(); for (int i = 0; i < components.Components.Count; i++) { if ((components.Components[i]) is XPView) { ((XPView)components.Components[i]).Session = m_ProductionSession; } else if ((components.Components[i]) is XPCollection) { ((XPCollection)components.Components[i]).Session = m_ProductionSession; } } m_Items = new ItemsBLL(); m_Production = new ProductionBLL(); m_Shift = new ShiftsBLL(); m_Machines = new MachinesLinesBLL(); m_Customers = new CustomersBLL(); LookUpColumnInfo shiftNameColumn = new LookUpColumnInfo() { Caption = "Shift", FieldName = "ShiftName" }; shiftLookUpEdit.Properties.Columns.Add(shiftNameColumn); shiftLookUpEdit.Properties.DisplayMember = "ShiftName"; shiftLookUpEdit.Properties.ValueMember = "ShiftID"; shiftFilterLookUpEdit.Properties.Columns.Add(shiftNameColumn); shiftFilterLookUpEdit.Properties.DisplayMember = "ShiftName"; shiftFilterLookUpEdit.Properties.ValueMember = "ShiftID"; //Dim machineNameColumn As Controls.LookUpColumnInfo = New Controls.LookUpColumnInfo() With {.Caption = "Machine Line", .FieldName = "MachineLineName"} //Me.machineLookUpEdit.Properties.Columns.Add(machineNameColumn) //Me.machineLookUpEdit.Properties.DisplayMember = "MachineLineName" //Me.machineLookUpEdit.Properties.ValueMember = "MachineLineID" //Me.machineFilterLookUpEdit.Properties.Columns.Add(machineNameColumn) //Me.machineFilterLookUpEdit.Properties.DisplayMember = "MachineLineName" //Me.machineFilterLookUpEdit.Properties.ValueMember = "MachineLineID" FillDropDowns(); PrepareNewRecord(); if (DateTime.Now.TimeOfDay < new TimeSpan(9, 0, 0)) { productionDateEdit.DateTime = DateTime.Today.AddDays(-1); } else { productionDateEdit.DateTime = DateTime.Today; } SetDefaultViewFilter(); FillProductionView(); Cursor = Cursors.Default; }