Beispiel #1
0
        public DetailShowFrm(Object v)
        {
            InitializeComponent();
            Member member = (Member)v;

            mind           = new MindController();
            counselMemoFrm = new CounselMemo(null);

            member.GetID();

            this.txt_ID.Text         = member.GetID().ToString();
            this.txt_Name.Text       = member.GetName().ToString();
            this.txt_Phone.Text      = member.GetPhone().ToString();
            this.txt_Email.Text      = member.GetEmail().ToString();
            this.dtp_birthdate.Value = member.GetBirthDate();
            this.cmb_familyType.Text = member.GetFamilytype();

            // DatagridView
            RefreshDataGrid();

            // ComboBox
            DataTable dt = mind.GetCmbFamilyType();

            cmb_familyType.DataSource    = dt;
            cmb_familyType.DisplayMember = "Name";
            cmb_familyType.ValueMember   = "Id";
        }
Beispiel #2
0
        private void Btn_counselMemo_Click(object sender, EventArgs e)
        {
            Boolean state  = true;
            Crypt   crypt  = mind.GetCrypt();
            string  passwd = crypt.Encrypt(txt_strPasswd.Text);

            Counsel_table counsel_Table = new Counsel_table();

            counsel_Table.ID = int.Parse(dataGridView.Rows[dataGridView.CurrentCellAddress.Y].Cells[0].Value.ToString());

            if (txt_strPasswd.Text.Length == 0 &&
                state == true)
            {
                MessageBox.Show("상담자 비밀번호를 입력하세요\r(Enter the counselor password)", "알림(Alert)", MessageBoxButtons.OK, MessageBoxIcon.Information);
                state = false;
            }

            if (mind.CheckPassword(passwd) == false &&
                state == true)
            {
                MessageBox.Show("비밀번호가 일치하지 않습니다.\r(Mismatch password.)", "알림(Alert)", MessageBoxButtons.OK, MessageBoxIcon.Information);
                state = false;
            }

            //MessageBox.Show(mind.CheckPassword(passwd).ToString())

            // state가 true일 때
            if (state == true)
            {
                counselMemoFrm       = new CounselMemo((object)counsel_Table);
                counselMemoFrm.Owner = this;
                counselMemoFrm.ShowDialog();
            }
        }