Пример #1
0
        private void btnDataBaseLoad_Click(object sender, System.EventArgs e)
        {
            HONUS.MaterialDatabase.Form.frmMD_Main2 frmMD = new HONUS.MaterialDatabase.Form.frmMD_Main2();
            frmMD.bIsSearchPopup = true;
            frmMD.ClosingFlag    = true;

            frmMD.ucSearchingCondition_SingleMulti_Control(true);

            if (frmMD.ShowDialog() == DialogResult.OK)
            {
                string strSelected_ID = frmMD.strSelectedItem_ID;

                HONUS.MaterialDatabase.Component.MD_DB MD_DB1 = new HONUS.MaterialDatabase.Component.MD_DB();
                DataSet dsSearchResult = MD_DB1.Search(frmMD.bIsSingle, strSelected_ID);

                edtName.Text = dsSearchResult.Tables[0].Rows[0]["Name"].ToString();
                cboType_Select(dsSearchResult.Tables[0].Rows[0]["MatType"].ToString());

                edtFlowResistivity.Text   = dsSearchResult.Tables[0].Rows[0]["FlowRes"].ToString();
                edtThickness.Text         = dsSearchResult.Tables[0].Rows[0]["Thick"].ToString();
                edtLossFactor.Text        = dsSearchResult.Tables[0].Rows[0]["LossFactor"].ToString();
                edtBulkDensity.Text       = dsSearchResult.Tables[0].Rows[0]["BulkDens"].ToString();
                edtYoungsModulus.Text     = dsSearchResult.Tables[0].Rows[0]["Ymodulus"].ToString();
                edtPoissionsRatio.Text    = dsSearchResult.Tables[0].Rows[0]["PoissionR"].ToString();
                edtProsity.Text           = dsSearchResult.Tables[0].Rows[0]["Prosity"].ToString();
                edtStructureFactor.Text   = dsSearchResult.Tables[0].Rows[0]["Sfactor"].ToString();
                edtViscousCharLength.Text = dsSearchResult.Tables[0].Rows[0]["ViscousCL"].ToString();
                edtThermalCharLength.Text = dsSearchResult.Tables[0].Rows[0]["ThermalCL"].ToString();
                bIsDataBaseLoad           = true;
            }
            else
            {
            }
        }
Пример #2
0
        private void btnDBNameLoad_Click(object sender, System.EventArgs e)
        {
            HONUS.MaterialDatabase.Form.frmMD_Main2 frmMD = new HONUS.MaterialDatabase.Form.frmMD_Main2();
            frmMD.bIsSearchPopup = true;
            frmMD.ClosingFlag = true;

            frmMD.ucSearchingCondition_SingleMulti_Control(false);

            if(frmMD.ShowDialog() == DialogResult.OK)
            {
                string strSelected_ID = frmMD.strSelectedItem_ID;

                HONUS.MaterialDatabase.Component.MD_DB MD_DB1 = new HONUS.MaterialDatabase.Component.MD_DB();
                DataSet dsSearchResult = MD_DB1.Search(frmMD.bIsSingle,strSelected_ID);

                for(int i = 0 ; i < dsSearchResult.Tables[0].Rows.Count ; i++)
                {
                    edtName.Text = dsSearchResult.Tables[0].Rows[i]["Name"].ToString();
                    cboType_Select(dsSearchResult.Tables[0].Rows[i]["MatType"].ToString());

                    edtFlowResistivity.Text = dsSearchResult.Tables[0].Rows[i]["FlowRes"].ToString();
                    edtThickness.Text = dsSearchResult.Tables[0].Rows[i]["Thick"].ToString();
                    edtLossFactor.Text = dsSearchResult.Tables[0].Rows[i]["LossFactor"].ToString();
                    edtBulkDensity.Text = dsSearchResult.Tables[0].Rows[i]["BulkDens"].ToString();
                    edtYoungsModulus.Text = dsSearchResult.Tables[0].Rows[i]["Ymodulus"].ToString();
                    edtPoissionsRatio.Text = dsSearchResult.Tables[0].Rows[i]["PoissionR"].ToString();
                    edtThermalCharLength.Text = dsSearchResult.Tables[0].Rows[i]["ThermalCL"].ToString();
                    edtViscousCharLength.Text = dsSearchResult.Tables[0].Rows[i]["ViscousCL"].ToString();
                    edtProsity.Text = dsSearchResult.Tables[0].Rows[i]["Prosity"].ToString();
                    edtStructureFactor.Text = dsSearchResult.Tables[0].Rows[i]["Sfactor"].ToString();
                    edtEmp1.Text = dsSearchResult.Tables[0].Rows[i]["EmP1"].ToString();
                    edtPratiop1.Text = dsSearchResult.Tables[0].Rows[i]["PRatioP1"].ToString();
                    edthp2.Text = dsSearchResult.Tables[0].Rows[i]["HP2"].ToString();
                    edtdensityp2.Text = dsSearchResult.Tables[0].Rows[i]["DensityP2"].ToString();
                    edthp1.Text = dsSearchResult.Tables[0].Rows[i]["HP1"].ToString();
                    edtdensityp1.Text = dsSearchResult.Tables[0].Rows[i]["DensityP1"].ToString();
                    edtEmp2.Text = dsSearchResult.Tables[0].Rows[i]["EmP2"].ToString();
                    edtPratiop2.Text = dsSearchResult.Tables[0].Rows[i]["PRatioP2"].ToString();
                    if(dsSearchResult.Tables[0].Rows[0]["Occurred_Date"].ToString() != "")
                    {
                        dtDate.Value = DateTime.Parse(dsSearchResult.Tables[0].Rows[0]["Occurred_Date"].ToString());
                    }
                    edtVendor.Text = dsSearchResult.Tables[0].Rows[0]["Vendor"].ToString();
                    edtProducing.Text = dsSearchResult.Tables[0].Rows[0]["Producing"].ToString();

                    btnAdd_Click(null,null);
                }
            }
            else
            {
            }
        }
Пример #3
0
        private void btnDataBaseLoad_Click(object sender, System.EventArgs e)
        {
            HONUS.MaterialDatabase.Form.frmMD_Main2 frmMD = new HONUS.MaterialDatabase.Form.frmMD_Main2();
            frmMD.bIsSearchPopup = true;
            frmMD.ClosingFlag = true;

            frmMD.ucSearchingCondition_SingleMulti_Control(true);

            if(frmMD.ShowDialog() == DialogResult.OK)
            {
                string strSelected_ID = frmMD.strSelectedItem_ID;

                HONUS.MaterialDatabase.Component.MD_DB MD_DB1 = new HONUS.MaterialDatabase.Component.MD_DB();
                DataSet dsSearchResult = MD_DB1.Search(frmMD.bIsSingle,strSelected_ID);

                edtName.Text = dsSearchResult.Tables[0].Rows[0]["Name"].ToString();
                cboType_Select(dsSearchResult.Tables[0].Rows[0]["MatType"].ToString());

                edtFlowResistivity.Text = dsSearchResult.Tables[0].Rows[0]["FlowRes"].ToString();
                edtThickness.Text = dsSearchResult.Tables[0].Rows[0]["Thick"].ToString();
                edtLossFactor.Text = dsSearchResult.Tables[0].Rows[0]["LossFactor"].ToString();
                edtBulkDensity.Text = dsSearchResult.Tables[0].Rows[0]["BulkDens"].ToString();
                edtYoungsModulus.Text = dsSearchResult.Tables[0].Rows[0]["Ymodulus"].ToString();
                edtPoissionsRatio.Text = dsSearchResult.Tables[0].Rows[0]["PoissionR"].ToString();
                edtProsity.Text = dsSearchResult.Tables[0].Rows[0]["Prosity"].ToString();
                edtStructureFactor.Text = dsSearchResult.Tables[0].Rows[0]["Sfactor"].ToString();
                edtViscousCharLength.Text = dsSearchResult.Tables[0].Rows[0]["ViscousCL"].ToString();
                edtThermalCharLength.Text = dsSearchResult.Tables[0].Rows[0]["ThermalCL"].ToString();
                bIsDataBaseLoad = true;
            }
            else
            {
            }
        }