コード例 #1
0
ファイル: frmDocType.cs プロジェクト: ScoreSolutions/DLT-SCAN
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (ValidateData() == true)
            {
                DocTypePara para = new DocTypePara();
                para.ID = Convert.ToInt64(txtID.Text);
                para.DOCTYPE_CODE = txtDocTypeCode.Text;
                para.DOCTYPE_NAME = txtDoctypeName.Text;

                DocTypeFunc fnc = new DocTypeFunc();
                if (fnc.SaveDocType(para) == true)
                {
                    getDocTypeAllList();
                    ClearForm();
                    MessageBox.Show("บันทึกข้อมูลเรียบร้อย");
                    txtDocTypeCode.Focus();
                }
                else
                {
                    MessageBox.Show(fnc.ErrorMessage);
                    txtDocTypeCode.Focus();
                    txtDocTypeCode.SelectAll();
                }
            }
        }