Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.ContentValues; import android.database.sqlite.SQLiteDatabase; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { private static void insertClientToWedding(SQLiteDatabase db, String nameClient, boolean weddingType, long weddingDate, String weddingPlace, String groomFullName, String groomPhone, String groomSoc, String brideFullName, String bridePhone, String brideSoc, int weddingBegin, int weddingEnd, String weddingMeet, int visaj, int visArr, int barber, int barberArr, int videoOp, int vidArr, int groomArr, String zagsName, int zagsFillTime, String walkDesc, String walkPlace, String banketPlace, int banketBegin, String wit1, String wit1Soc, String wit2, String wit2Soc, int photoAuthorCount, String photoFormat, String photoBook, int photoBookSize, int pbookTurns, int weddingCost, int garant, long dateOfPact, String weddingNote) { ContentValues cv = new ContentValues(); cv.put("NAME", nameClient); cv.put("WEDDING_TYPE", weddingType); cv.put("WEDDING_DATE", weddingDate); cv.put("WEDDING_DATE_STRING", new SimpleDateFormat("dd MMM yy E", Locale.getDefault()).format(new Date(weddingDate))); cv.put("WEDDING_PLACE", weddingPlace); cv.put("WEDDING_GROOM", groomFullName); cv.put("WEDDING_GROOM_PHONE", groomPhone); cv.put("WEDDING_GROOM_SOC", groomSoc); cv.put("WEDDING_BRIDE", brideFullName); cv.put("WEDDING_BRIDE_PHONE", bridePhone); cv.put("WEDDING_BRIDE_SOC", brideSoc); cv.put("WEDDING_BEGIN", weddingBegin); cv.put("WEDDING_END", weddingEnd); cv.put("WEDDING_MEET", weddingMeet); cv.put("WEDDING_VIS", visaj); cv.put("WEDDING_VIS_ARR", visArr); cv.put("WEDDING_BARBER", barber); cv.put("WEDDING_BARBER_ARR", barberArr); cv.put("WEDDING_CAMOP", videoOp); cv.put("WEDDING_CAMOP_ARR", vidArr); cv.put("WEDDING_GROOM_ARR", groomArr); cv.put("WEDDING_ZAGS", zagsName); cv.put("WEDDING_ZAGS_FILLTIME", zagsFillTime); cv.put("WEDDING_WALK", walkDesc); cv.put("WEDDING_WALK_PLACE", walkPlace); cv.put("WEDDING_BANKET_PLACE", banketPlace); cv.put("WEDDING_BANKET_START", banketBegin); cv.put("WEDDING_WIT1", wit1); cv.put("WEDDING_WIT1_SOC", wit1Soc); cv.put("WEDDING_WIT2", wit2); cv.put("WEDDING_WIT2_SOC", wit2Soc); cv.put("WEDDING_PHOT_AUT", photoAuthorCount); cv.put("WEDDING_PHOT_FORMAT", photoFormat); cv.put("WEDDING_PHOT_BOOK", photoBook); cv.put("WEDDING_PBOOK_SIZE", photoBookSize); cv.put("WEDDING_PBOOK_TURNS", pbookTurns); cv.put("WEDDING_COST", weddingCost); cv.put("WEDDING_GARANT", garant); cv.put("WEDDING_PACT_DATE", dateOfPact); cv.put("WEDDING_NOTE", weddingNote); db.insert("WEDDING", null, cv); } }