public ShinseiShinseiServiceOutBo execute()
        {
            ShinseiShinseiServiceOutBo outBo = new ShinseiShinseiServiceOutBo();

            outBo = this.inputCheck(this.inBo);

            if (!String.IsNullOrEmpty(outBo.errorMessage))
            {
                return(outBo);
            }

            string message = "";

            message += "論理名 :" + this.inBo.ronrimei1TextBox + System.Environment.NewLine;
            message += "よみがな:" + this.inBo.ronrimei2TextBox + System.Environment.NewLine;
            message += "物理名 :" + this.inBo.butsurimeiTextBox + System.Environment.NewLine + System.Environment.NewLine;
            DialogResult result = MessageBox.Show(message + "申請してもよろしいですか?", "申請確認", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                using (var context = new MyContext())
                {
                    WordShinsei shinsei = new WordShinsei();
                    shinsei.ronri_name1  = this.inBo.ronrimei1TextBox;
                    shinsei.ronri_name2  = this.inBo.ronrimei2TextBox;
                    shinsei.butsuri_name = this.inBo.butsurimeiTextBox;
                    shinsei.status       = 0;
                    shinsei.user_id      = BaseForm.UserInfo.userId;
                    shinsei.cre_date     = System.DateTime.Now.ToString();
                    context.WordShinsei.Add(shinsei);
                    context.SaveChanges();
                }
            }
            return(outBo);
        }
Beispiel #2
0
 public void InsertWordShinsei(WordShinsei entity)
 {
     context.WordShinsei.Add(entity);
     context.SaveChanges();
 }