Ejemplo n.º 1
0
        private void InputChooseLoadData_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (InputChooseLoadData.SelectedIndex < 1 || mIsUpdating)
            {
                return;
            }

            using (var context = new mydbEntities())
            {
                string selectedReportID = InputChooseLoadData.SelectedItem.ToString().Substring(4, InputChooseLoadData.SelectedItem.ToString().IndexOf(" --- ") - (" --- ").Length + 1);
                mMotorTestData = context.Motor_test_data.FirstOrDefault(t => t.InputReportID == selectedReportID);
                if (null == mMotorTestData)
                {
                    return;
                }
                motortestdataBindingSource.DataSource = mMotorTestData;
                if (!mIsUpdating)
                {
                    ReloadComboboxContentFromDatabase();
                    ForceRefreshBindingDataToControls();
                }

                //InputChooseModel.SelectedIndex = mMotorTestData.ID_Motor;
            }
        }
Ejemplo n.º 2
0
 //public Motor_test_data mMotorTestData = new Motor_test_data();
 public ReportDlg(Motor_test_data mMotorTestData)
 {
     InitializeComponent();
     motortestdataBindingSource.DataSource      = mMotorTestData;
     this.reportViewer1.LocalReport.DisplayName = $"{mMotorTestData.InputMotorSN} - ESP MOTOR TEST REPORT";
     //this.reportViewer1.RefreshReport();
 }
Ejemplo n.º 3
0
 private void ButtonClear_Click(object sender, EventArgs e)
 {
     this.mMotorTestData = new Motor_test_data()
     {
         InputChooseMotorConfigForShaftExtension = "UT", InputChooseIsAirTestPassed = "NO", InputChooseDidMotorStartedWithLowVoltAt60Hz = "NO"
     };
     this.motortestdataBindingSource.DataSource = this.mMotorTestData;
     InputChooseSupplier.SelectedIndex          = -1;
     InputChooseSeries.SelectedIndex            = -1;
     InputChooseLoadData.SelectedIndex          = -1;
 }