Ejemplo n.º 1
0
        //グリッドからデータを選択
        private void GridEnter()
        {
            int    iX = 0;
            string msgStr;

            msgStr  = "";
            msgStr += dataGridView1[1, dataGridView1.SelectedRows[iX].Index].Value + "が選択されました" + "\n";
            msgStr += "よろしいですか?";

            if (MessageBox.Show(msgStr, "事業所選択", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
            {
                return;
            }
            else
            {
                try
                {
                    //データを取得する
                    if (GridviewSet.GetData(dataGridView1, ref cOffice) == false)
                    {
                        MessageBox.Show("該当するデータがマスターに登録されていません", "検索エラー", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    //'データ値を取得
                    //txtID.Text = cCostname.ID.ToString();
                    //txtName.Text = cCostname.Name;
                    //txtNote.Text = cCostname.Note;

                    txtCode.Text     = cOffice.ID.ToString();
                    txtName.Text     = cOffice.称;
                    txtZipCode.Text  = cOffice.郵便番号;
                    txtAddress1.Text = cOffice.住所1;
                    txtAddress2.Text = cOffice.住所2;
                    txtTel.Text      = cOffice.電話番号;
                    txtFax.Text      = cOffice.FAX番号;
                    txtMemo.Text     = cOffice.備考;

                    //IDテキストボックスは編集不可とする
                    txtCode.Enabled = false;

                    //ボタン状態
                    btnDel.Enabled = true;
                    btnClr.Enabled = true;

                    fMode.Mode = 1;     //フォームモードステータス:変更削除

                    txtName.Focus();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, "画面クリア", MessageBoxButtons.OK);
                }
            }
        }
Ejemplo n.º 2
0
        //グリッドからデータを選択
        private void GridEnter()
        {
            int    iX = 0;
            string msgStr;

            msgStr  = "";
            msgStr += dataGridView1[1, dataGridView1.SelectedRows[iX].Index].Value + "が選択されました" + "\n";
            msgStr += "よろしいですか?";

            if (MessageBox.Show(msgStr, "振込口座選択", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
            {
                return;
            }
            else
            {
                try
                {
                    //データを取得する
                    if (GridviewSet.GetData(dataGridView1, ref cMaster) == false)
                    {
                        MessageBox.Show("該当するデータがマスターに登録されていません", "検索エラー", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    //'データ値を取得
                    //txtCode.Text = cMaster.ID.ToString();
                    txtName1.Text = cMaster.金融機関名;
                    txtName2.Text = cMaster.支店名;

                    Utility.ComboKouza.selectedIndex(comboBox1, Int32.Parse(cMaster.口座種別.ToString()));

                    txtName2.Text  = cMaster.支店名;
                    txtNumber.Text = cMaster.口座番号;
                    txtMeigi.Text  = cMaster.口座名義;

                    //IDテキストボックスは編集不可とする
                    //txtCode.Enabled = false;

                    //ボタン状態
                    btnDel.Enabled = true;
                    btnClr.Enabled = true;

                    fMode.Mode = 1;     //フォームモードステータス:変更削除

                    txtName1.Focus();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, "画面クリア", MessageBoxButtons.OK);
                }
            }
        }
Ejemplo n.º 3
0
        //グリッドからデータを選択
        private void GridEnter()
        {
            int    iX = 0;
            string msgStr;

            msgStr  = "";
            msgStr += dataGridView1[1, dataGridView1.SelectedRows[iX].Index].Value + "が選択されました" + "\n";
            msgStr += "よろしいですか?";

            if (MessageBox.Show(msgStr, "判型選択", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
            {
                return;
            }
            else
            {
                try
                {
                    //データを取得する
                    if (GridviewSet.GetData(dataGridView1, ref cMaster) == false)
                    {
                        MessageBox.Show("該当するデータがマスターに登録されていません", "検索エラー", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    //'データ値を取得
                    //txtCode.Text = cMaster.ID.ToString();
                    txtName1.Text  = cMaster.称;
                    txtTanka1.Text = cMaster.卸単価1.ToString("##0.00");
                    txtTanka2.Text = cMaster.卸単価2.ToString("##0.00");
                    txtTanka3.Text = cMaster.卸単価3.ToString("##0.00");
                    txtMemo.Text   = cMaster.備考;

                    //IDテキストボックスは編集不可とする
                    //txtCode.Enabled = false;

                    //ボタン状態
                    btnDel.Enabled = true;
                    btnClr.Enabled = true;

                    fMode.Mode = 1;     //フォームモードステータス:変更削除

                    txtName1.Focus();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, "画面クリア", MessageBoxButtons.OK);
                }
            }
        }
Ejemplo n.º 4
0
        //グリッドからデータを選択
        private void GridEnter()
        {
            int    iX = 0;
            string msgStr;

            msgStr  = "";
            msgStr += dataGridView1[1, dataGridView1.SelectedRows[iX].Index].Value + "が選択されました" + "\n";
            msgStr += "よろしいですか?";

            if (MessageBox.Show(msgStr, "データ選択", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
            {
                return;
            }
            else
            {
                try
                {
                    //データを取得する
                    if (GridviewSet.GetData(dataGridView1, ref cMaster) == false)
                    {
                        MessageBox.Show("該当するデータがマスターに登録されていません", "検索エラー", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    //'データ値を取得
                    dateTimePicker1.Value = cMaster.日付;
                    txthCode.Text         = cMaster.配布員ID.ToString();
                    lblName.Text          = cMaster.配布員名;
                    txtName2.Text         = cMaster.摘要;
                    txtTanka.Text         = cMaster.単価.ToString();
                    txtSuuryou.Text       = cMaster.数量.ToString();
                    txtkingaku.Text       = cMaster.金額.ToString();

                    comboBox1.SelectedIndex = cMaster.支給控除区分;

                    //ボタン状態
                    btnDel.Enabled = true;
                    btnClr.Enabled = true;

                    fMode.Mode = 1;     //フォームモードステータス:変更削除

                    comboBox1.Focus();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, "画面クリア", MessageBoxButtons.OK);
                }
            }
        }
Ejemplo n.º 5
0
        //グリッドからデータを選択
        private void GridEnter()
        {
            int    iX = 0;
            string msgStr;

            msgStr  = "";
            msgStr += dataGridView1[0, dataGridView1.SelectedRows[iX].Index].Value + "が選択されました" + "\n";
            msgStr += "よろしいですか?";

            if (MessageBox.Show(msgStr, "選択", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
            {
                return;
            }
            else
            {
                try
                {
                    //データを取得する
                    if (GridviewSet.GetData(dataGridView1, ref cMaster) == false)
                    {
                        MessageBox.Show("該当するデータがマスターに登録されていません", "検索エラー", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    //'データ値を取得
                    //txtDATE.Text = cMaster.日付.ToShortDateString();

                    //ボタン状態
                    fMode.Mode = 1;     //フォームモードステータス:変更削除

                    comboBox1.Focus();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, "画面クリア", MessageBoxButtons.OK);
                }
            }
        }
Ejemplo n.º 6
0
        //グリッドからデータを選択
        private void GridEnter()
        {
            int    iX = 0;
            string msgStr;

            msgStr  = "";
            msgStr += dataGridView1[1, dataGridView1.SelectedRows[iX].Index].Value + "が選択されました" + "\n";
            msgStr += "よろしいですか?";

            if (MessageBox.Show(msgStr, "社員選択", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
            {
                return;
            }
            else
            {
                try
                {
                    //データを取得する
                    if (GridviewSet.GetData(dataGridView1, ref cMaster) == false)
                    {
                        MessageBox.Show("該当するデータがマスターに登録されていません", "検索エラー", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                        return;
                    }

                    //'データ値を取得
                    //txtID.Text = cCostname.ID.ToString();
                    //txtName.Text = cCostname.Name;
                    //txtNote.Text = cCostname.Note;

                    txtCode.Text = cMaster.ID.ToString();
                    txtName.Text = cMaster.氏名;
                    txtFuri.Text = cMaster.フリガナ;

                    Utility.ComboShozoku.selectedIndex(comboBox1, cMaster.所属コード);

                    txtYaku.Text = cMaster.役職;

                    if (cMaster.入社年月日 == "")
                    {
                        iDate.Checked = false;
                    }
                    else
                    {
                        iDate.Checked = true;
                        iDate.Value   = Convert.ToDateTime(cMaster.入社年月日);
                    }

                    txtMemo.Text = cMaster.備考;

                    //IDテキストボックスは編集不可とする
                    txtCode.Enabled = false;

                    //ボタン状態
                    btnDel.Enabled = true;
                    btnClr.Enabled = true;

                    fMode.Mode = 1;     //フォームモードステータス:変更削除

                    txtName.Focus();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, "画面クリア", MessageBoxButtons.OK);
                }
            }
        }