EXT form Submission Sample

Source: Internet
Author: User
				Panel.getform (). Submit ({
							URL: ' Servlet/dutyfrequencyservlet ',
							params: {
								type: ' Updatedutynummanager ',
								isdutynum:isdutynum
							},
							success:function (form, action) {
								if (action.result.msg.opro_code==0) {
									alert (ACTION.RESULT.MSG.OPRO_DESC);
									Panel.getform (). reset ();//Reset the value of all the form components in the table single-sided board
									Dutygridpanel.store.reload ();
								} else{
									alert (ACTION.RESULT.MSG.OPRO_DESC);
								}
							,
							failure:function (form, action) {
								if ( Action.result!= null) {
									alert (' Modify failed. ');
								}
							}
						});
			


	/**
	 * Updatedutynummanager Modification Shift * * 
	 @param request
	 * @param response
	 * @param session
	 * @throws IOException
	 * * Public
	void Updatedutynummanager (HttpServletRequest request,
			HttpServletResponse Response, Mainsessionbean session)
			throws IOException {
		long dutynum = Long.parselong (Request.getparameter ( "Isdutynum"));
		String dutyname = Request.getparameter ("duty_frequency");
		String begintime = Request.getparameter ("StartTime");
		String Endtime = Request.getparameter ("Endtime");
		String remarks = Request.getparameter ("Remarks");
		HashMap hmap = new HashMap ();
		HashMap HM = datebean.updatedutyfrequency (Dutynum, Dutyname,begintime, Endtime, remarks, Session.getuserid ());
		Hmap.put ("Success", true);
		Hmap.put ("MSG", HM);
		Jsonutil.responsejsonobject (response, Hmap);

	}


	/** * @param dutynum * @param dutyname * @param begintime * @param endtime * @param remarks * @  return */Public HashMap updatedutyfrequency (long dutynum, String dutyname, String begintime, String Endtime, String
		remarks, int userid) {Connection conn = null;
		HashMap HM = new HashMap ();
		CallableStatement Cstam = null;
			try {conn = cm.getconnection ();
			Cstam = Conn.preparecall ("Call P_update_duty_frequency (?,?,?,?,?,?,?,?)");
			Cstam.setstring (1, dutyname);
			Cstam.setstring (2, begintime);
			Cstam.setstring (3, Endtime);
			Cstam.setstring (4, remarks);
			Cstam.setint (5, UserID);
			Cstam.setlong (6, Dutynum);
			Cstam.registeroutparameter (7, Java.sql.Types.INTEGER);
			Cstam.registeroutparameter (8, Java.sql.Types.VARCHAR);
			Cstam.execute ();
			Hm.put ("Opro_code", Cstam.getlong (7));
		Hm.put ("Opro_desc", cstam.getstring (8));
			catch (SQLException e) {e.printstacktrace ();
			Hm.put ("Opro_code", "-1"); Hm.put ("Opro_desc", "Program execution exception"); finally {CM.
		Closecstam (null, Cstam, CONTANTS.WEBGISPOOLNAME, conn);
	return HM;
 }


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.