protected void cmdUpdate_Click(object sender, EventArgs e) { Message msg = new Message(g_user_id, g_lang); Mgmt mgmt = new Mgmt(g_user_id, g_lang); mgmt.mgmt_cd = txtManagement.Text.ToUpper(); //if (hdnUpdMode.Value == "3") //{ // DataSet ds = new DataSet(); // ds = management.GetUserListByManagement(); // if (ds.Tables[0].Rows.Count > 0) // { // lblMsg.Text = msg.GetMessage("ROLE_DEL_ERR"); // lblMsg.ForeColor = Color.Red; // return; // } //} //必須項目のチェック if (txtManagementDesc1.Text == "") { lblMsg.Text = msg.GetMessage("INPUT_MANDATORY_ERR") + "(" + flblManagementDesc1.Text + ")"; lblMsg.ForeColor = Color.Red; return; } ComLibrary com = new ComLibrary(); // ロールマスタを更新 // 画面から項目を編集 mgmt.mgmt_cd = txtManagement.Text; mgmt.mgmt_desc = txtManagementDesc1.Text; mgmt.chg_user_id = g_user_id; //role.chg_pgm = "MstRoleMnt"; int rtn = 0; switch (hdnUpdMode.Value) { case "1": // Insert rtn = mgmt.Insert(); break; case "2": // Update rtn = mgmt.Update(); break; case "3": // Delete rtn = mgmt.Delete(); break; } if (rtn == ComConst.FAILED) { lblMsg.Text = mgmt.strErr; lblMsg.ForeColor = Color.Red; return; } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; if (hdnUpdMode.Value == "3") { Clear_Screen(1); } hdnInputMode.Value = "0"; Screen_Control(hdnUpdMode.Value); }