Example #1
0
        private void ButtonNutEdit_Click(object sender, EventArgs e)
        {
            int rowNo = dataGridViewKako.CurrentCellAddress.Y;


            FormNut frmNut = new FormNut();

            frmNut.labelTokuisaki.Text  = textBoxTokuisaki.Text;
            frmNut.labelSeihinCode.Text = textBoxSeihinCode.Text;
            frmNut.labelSeihinMei.Text  = textBoxSeihinMei.Text;
            frmNut.labelBuhinCode.Text  = textBoxBuhinCode.Text;
            frmNut.labelBuhin.Text      = textBoxSiyoTaisyo.Text + " " +
                                          textBoxThickness.Text + "T x " +
                                          textBoxWidth.Text + " x " +
                                          textBoxLength.Text;
            frmNut.labelSuryo.Text     = "数量 " + textBoxSuryo.Text;
            frmNut.labelKanriCode.Text = toolSSLabelKanriCode.Text;
            string editNo = string.Format("{0}-{1}", toolSSLabelKanriCode.Text, (string)ds.Tables["金物"].Rows[rowNo]["金物コード"]);

            frmNut.labelKakouKanriCode.Text = editNo;
            //金物コード
            frmNut.textBoxNutCode.Text = (string)ds.Tables["金物"].Rows[rowNo]["金物コード"].ToString();
            //金物名
            frmNut.textBoxNut.Text = (string)ds.Tables["金物"].Rows[rowNo]["金物名"];
            //数量
            decimal suryo = (decimal)ds.Tables["金物"].Rows[rowNo]["数量"];

            frmNut.textBoxSuryo.Text = suryo.ToString("#,#0.#");

            if (frmNut.ShowDialog() == DialogResult.OK)
            {
                DisplayNut(toolSSLabelKanriCode.Text);
            }
        }
Example #2
0
        private void ButtonAddNut_Click(object sender, EventArgs e)
        {
            FormNut frmNut = new FormNut();

            frmNut.labelTokuisaki.Text  = textBoxTokuisaki.Text;
            frmNut.labelSeihinCode.Text = textBoxSeihinCode.Text;
            frmNut.labelSeihinMei.Text  = textBoxSeihinMei.Text;
            frmNut.labelBuhinCode.Text  = textBoxBuhinCode.Text;
            frmNut.labelBuhin.Text      = textBoxSiyoTaisyo.Text + " " +
                                          textBoxThickness.Text + "T x " +
                                          textBoxWidth.Text + " x " +
                                          textBoxLength.Text;
            frmNut.labelSuryo.Text          = "数量 " + textBoxSuryo.Text;
            frmNut.labelKanriCode.Text      = toolSSLabelKanriCode.Text;
            frmNut.labelKakouKanriCode.Text = "";

            if (frmNut.ShowDialog() == DialogResult.OK)
            {
                DisplayNut(toolSSLabelKanriCode.Text);
            }
        }