コード例 #1
0
        private void btnOK_Click(object sender, System.EventArgs e)
        {
            if (edtName.Text != "")
            {
                HONUS.MaterialPropertiesEstimation.Component.MPE_DB MPE_DB1 = new HONUS.MaterialPropertiesEstimation.Component.MPE_DB();

                int count = MPE_DB1.ISNameSame(edtName.Text);
                if (count == 0)
                {
                    this.DialogResult = DialogResult.OK;

                    this.Close();
                }
                else
                {
                    MessageBox.Show("이미 같은 이름이 존재합니다.");

                    this.DialogResult = DialogResult.OK;

                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("이름을 입력하세요.");
            }
        }
コード例 #2
0
ファイル: dgName.cs プロジェクト: InsungChoi/dddd
        private void btnOK_Click(object sender, System.EventArgs e)
        {
            if(edtName.Text != "")
            {
                HONUS.MaterialPropertiesEstimation.Component.MPE_DB MPE_DB1 = new HONUS.MaterialPropertiesEstimation.Component.MPE_DB();

                int count = MPE_DB1.ISNameSame(edtName.Text);
                if(count == 0)
                {
                    this.DialogResult = DialogResult.OK;

                    this.Close();
                }
                else
                {
                    MessageBox.Show("�̹� ���� �̸��� �����մϴ�.");

                    this.DialogResult = DialogResult.OK;

                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("�̸��� �Է��ϼ���.");
            }
        }
コード例 #3
0
        private void cboMaterialType_Bind(string str_ID)
        {
            cboMaterialType.Items.Clear();

            HONUS.MaterialPropertiesEstimation.Component.MPE_DB MPE_DB1 = new HONUS.MaterialPropertiesEstimation.Component.MPE_DB();
            MaterialTypeds = MPE_DB1.GetMaterialType(0);

            for (int i = 0; i < MaterialTypeds.Tables[0].Rows.Count; i++)
            {
                MaterialType MaterialType1 = new MaterialType();
                MaterialType1.Name = MaterialTypeds.Tables[0].Rows[i]["MatType"].ToString();
                MaterialType1.ID   = MaterialTypeds.Tables[0].Rows[i]["MID"].ToString();

                cboMaterialType.Items.Add(MaterialType1.Name);

                if (str_ID == MaterialTypeds.Tables[0].Rows[i]["MID"].ToString())
                {
                    cboMaterialType.SelectedIndex = i;
                }
            }

            if (str_ID == "")
            {
                cboMaterialType.SelectedIndex = 0;
            }
        }
コード例 #4
0
        private void cboMaterialType_Bind(string str_ID)
        {
            cboMaterialType.Items.Clear();

            HONUS.MaterialPropertiesEstimation.Component.MPE_DB MPE_DB1 = new HONUS.MaterialPropertiesEstimation.Component.MPE_DB();
            MaterialTypeds = MPE_DB1.GetMaterialType(0);

            for(int i = 0 ; i < MaterialTypeds.Tables[0].Rows.Count ; i++)
            {
                MaterialType MaterialType1 = new MaterialType();
                MaterialType1.Name = MaterialTypeds.Tables[0].Rows[i]["MatType"].ToString();
                MaterialType1.ID = MaterialTypeds.Tables[0].Rows[i]["MID"].ToString();

                cboMaterialType.Items.Add(MaterialType1.Name);

                if(str_ID == MaterialTypeds.Tables[0].Rows[i]["MID"].ToString())
                {
                    cboMaterialType.SelectedIndex = i;
                }
            }

            if(str_ID == "")
            {
                cboMaterialType.SelectedIndex = 0;
            }
        }