Exemplo n.º 1
0
        private void btnOk_Click(object sender, System.EventArgs e)
        {
            this.DialogResult = DialogResult.OK;

            MultiLayer_Find1 = new clsMultiLayer_Find();

            MultiLayer_Find1.strName       = edtName.Text;
            MultiLayer_Find1.strTotalThick = edtTotalThick.Text;

            this.Close();
        }
Exemplo n.º 2
0
        /// <summary>
        /// ��ȸ �Լ�
        /// </summary>
        /// <param name="Category"></param>
        /// <param name="IncidenceCondition"></param>
        /// <param name="MaterialType"></param>
        /// <param name="Option"></param>
        /// <param name="Frequency">1,Narrow band 2,Octave 3,1/3 Octav</param>
        public void Search(string Category,string IncidenceCondition,string MaterialType,string Option,string Frequency,
			clsAbsorptionCoefficient_Find clsAbsorptionCoefficient_RB,clsAbsorptionCoefficient_Find clsAbsorptionCoefficient_AT,
			clsAbsorptionCoefficient_Find clsAbsorptionCoefficient_TL,clsParameters clsParameters1,clsMultiLayer_Find clsMultiLayer_Find1,string strVendor,
			string strProducing,string strDate,int dMeasured)
        {
            string strIDs = "";
            bool bFlag = false;
            string strSID_Temp = "";

            MD_DB MD_DB1 = new MD_DB();

            switch(Option)
            {
                case "Absorption coefficient-rigid backing":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,clsAbsorptionCoefficient_RB.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = AbsorptionCoefficient_RigidBackingCheck(dsSearchResult,clsAbsorptionCoefficient_RB);
                    break;
                case "Absorption coefficient-anechoic termination":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,clsAbsorptionCoefficient_AT.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = AbsorptionCoefficient_AnechoicTerminationCheck(dsSearchResult,clsAbsorptionCoefficient_AT);
                    break;
                case "Transmission Loss":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,Frequency,clsAbsorptionCoefficient_TL.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = TransmissionLossCheck(dsSearchResult,clsAbsorptionCoefficient_TL);
                    break;
                case "Parameters":
                    dsSearchResult = MD_DB1.Search_Parameter(Category,IncidenceCondition,MaterialType,"0",clsParameters1.strName,strVendor,strProducing,strDate,dMeasured);
                    strIDs = ParametersCheck(dsSearchResult,clsParameters1);

                    bFlag = true;
                    break;
                case "MultiLayer":
                    dsSearchResult = MD_DB1.Search("Multi",IncidenceCondition,MaterialType,Frequency,"",strVendor,strProducing,strDate,dMeasured);
                    Category = "Multi";
                    strIDs = MultiLayerCheck(dsSearchResult,clsMultiLayer_Find1.strName,clsMultiLayer_Find1.strTotalThick);
                    bFlag = true;
                    break;
                case "Select":
                    dsSearchResult = MD_DB1.Search(Category,IncidenceCondition,MaterialType,"0","",strVendor,strProducing,strDate,dMeasured);
                    bFlag = true;
                    break;
            }
            if(bFlag == false)
            {
                dsSearchResult = MD_DB1.Search_IDs(Category,strIDs);
            }

            strSingle_Multi = Category;

            lstSearchResultList.Items.Clear();

            if(dsSearchResult != null)
            {
                if(Category != "Single")
                {
                    MultiListSetting();
                }
                else
                {
                    SearchResultList_Init();

                    MeterialTypeChange(this.strMeterialTypeChange);
                }

                for(int i = 0 ; i < dsSearchResult.Tables[0].Rows.Count ; i++)
                {
                    ListViewItem item = new ListViewItem();

                    if(Category == "Single")
                    {
                        if(strSID_Temp != dsSearchResult.Tables[0].Rows[i]["SID"].ToString())
                        {
                            strSID_Temp = dsSearchResult.Tables[0].Rows[i]["SID"].ToString();

                            item.SubItems[0].Text = dsSearchResult.Tables[0].Rows[i]["SID"].ToString();

                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Name"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Thick"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["FlowRes"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["LossFactor"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["BulkDens"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Ymodulus"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["PoissionR"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["ThermalCL"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["ViscousCL"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Prosity"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["Sfactor"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["EmP1"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["PRatioP1"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["DensityP1"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["EmP2"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["HP2"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["HP2"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["HP1"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["PRatioP2"].ToString());
                            item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["MID"].ToString());

                            lstSearchResultList.Items.Add(item);
                        }

                        bIsSingle = true;
                    }
                    else
                    {
                        item.SubItems[0].Text = dsSearchResult.Tables[0].Rows[i]["LID"].ToString();

                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["MultiLayer.Name"].ToString());
                        item.SubItems.Add(dsSearchResult.Tables[0].Rows[i]["TotalThick"].ToString());

                        bIsSingle = false;

                        lstSearchResultList.Items.Add(item);
                    }

                    //strSearchResult_Selected_ID = item.SubItems[0].Text;
                }
            }

            if(dsSearchResult == null || dsSearchResult.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("�˻� ����� �����ϴ�");
            }

            //pnlGraphOption.Enabled = false;
        }
Exemplo n.º 3
0
        private void btnOk_Click(object sender, System.EventArgs e)
        {
            this.DialogResult = DialogResult.OK;

            MultiLayer_Find1 = new clsMultiLayer_Find();

            MultiLayer_Find1.strName = edtName.Text;
            MultiLayer_Find1.strTotalThick = edtTotalThick.Text;

            this.Close();
        }