Posts

how to pass values with respective update table in mysql -

when call stored procedure passing in lists of data input: in pk varchar(max) = “11;12;13” in forenam varchar(max)= “test1;test2;test3” in surnam varchar(max) = “tst1;tst2;tst3” in bdate varchar(max) = “2016-01-02; 2016-01-04; 2016-01-03” in comm varchar(max) = “comments1;comm2;comm3” in table_nam varchar(max)= “name1” it should update table named “name1” below in 1 call sp pk forename surname bdate comments 11 test1 tst1 2016-01-02 comments1 12 test2 tst2 2016-01-04 comm2 13 test3 tst3 2016-01-03 comm3` create definer=`username`@`%` procedure `sp_ukflmm_update_multitable`( in pk int, in forenam varchar(255), in surnam varchar(255), in bdate datetime, in comm varchar(1000), in table_nam varchar(255)) begin if table_nam in ('uk_flmm_demanddata','uk_flmm_completed_demanddata') update table_nam set forename=forenam,surname=surnam,birthdate=bdate,comments=comm id=pk; else if table_nam = 'uk_flmm_sequencedata' update ...

Angular 2 load module in modal popup -

i using angular 2 bootstrap. have requirement - there dashboard page. once user clicks on link on dashboard page, new module shown on modal popup. how achieve this. application size big use angular lazy loading feature. in advance i think question needs more details proper answer. but have gathered want load modal content of module. this easy achieve: component dashboard component b component shown on dashboard , has selector componentb now define modal code in component b, if need data component use @input() in component b. in component add component selector in html , use button/link other element, call modal window. component html: <a data-toggle="modal" data-target="#modalwindowname">ok</a> <componentb></componentb> the above code trigger modal in component b name modalwindowname. you can communicate componentb using input , output exchange values if needed.

Facing ClassFoundException when i am using Spring @Transactional annotationn. When I removed annotation everything working fine -

we migrating our application xml annotation based configuration. when trying access @tranasactional class getting classnotfoundexception. find below stack trace. in computeevaluatefailureservice class using method level annotation. org.springframework.beans.factory.beancreationexception: error creating bean name 'computeevaluatefailureservice': initialization of bean failed; nested exception org.springframework.aop.framework.aopconfigexception: not generate cglib subclass of class [class com.xx.xx.service.computeevaluatefailureservice]: common causes of problem include using final class or non-visible class; nested exception org.springframework.cglib.core.codegenerationexception: java.lang.reflect.invocationtargetexception-->null @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:547) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstract...

java - How can I get node name while I am using orderByChild in Firebase? -

Image
here's code: @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { query queryref = mdatabase.child("users").orderbychild("age"); queryref.addvalueeventlistener(new valueeventlistener() { @override public void ondatachange(datasnapshot snapshot) { (datasnapshot chatsnapshot: snapshot.getchildren()) { user users = chatsnapshot.getvalue(user.class); string name = users.getname(); system.out.println(name); } } @override public void oncancelled(databaseerror databaseerror) { } }); // inflate layout fragment return inflater.inflate(r.layout.fragment_home, container, false); } as guys guessed, code displaying users name. want is, based on same query result, want display user ids,not name. tried using class user id: public class user{ ...

java - Rotating PDFContentByte Overlay Content -

i have created watermark text vertically centered. this line used pdfpatternpainter.showtextalignedkerned(element.align_middle, string, x, y, -90); what want make watermark diagonal. changing angle value make diagonal, x,y position not centered anymore. this current method public static void createwatermarkpdf(arraylist<string> watermark, pdfreader reader, pdfstamper stamper) throws exception { rectangle pagesize = reader.getpagesize(1); final float watermark_page_angle = 270; basefont font = basefont.createfont(basefont.helvetica, basefont.winansi, basefont.not_embedded); pdfpatternpainter painter = stamper.getovercontent(1).createpattern(pagesize.getwidth(), pagesize.getheight()); painter.setcolorstroke(new basecolor(192, 192, 192)); int font_size = 80; painter.begintext(); painter.settextrenderingmode(pdfpatternpainter.text_render_mode_fill); painter.setfontandsize(font, font_size); (int i=0; i<watermark.size(); i...

c# - How to insert range of datas from asp.net textboxes into SQL Server -

i have 2 textboxes startno , endno , column number in sql server. want insert values between startno , endno . if enter 1 in startno textbox , 10 in endno textbox, values (1, 2, ..., 10) should inserted in sql server column number . in c# use for(i = 1; <= 10; i++) ... how in t-sql, or there for statement in stored procedures? either need use c# loop , execute statement multiple times, using sql bulk copy method if number of columns can large or lastly can build values section comma delimited string , pass in stored procedure , execute dynamic sql.

c# - How to bind DataGridView with two tables, and perform CRUD operation in WPF -

here table structures: first table: create table [dbo].[tbltoolmodification_pramary] ( [id] [int] identity(1,1) not null, [reportno] [varchar](50) not null, [toolmodificationdate] [varchar](50) null, [productcode] [varchar](50) null, [productiondescription] [varchar](50) null, [drawingno] [varchar](50) null, [dieno] [varchar](50) null, [noofcavity] [varchar](50) null, [diemakercode] [varchar](50) null, [diemakername] [varchar](50) null, constraint [pk_tbltoolmodification_pramary] primary key clustered ([reportno] asc) (pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on) on [primary] ) on [primary] create table [dbo].[tbltoolmodification_foreign] ( [id] [int] identity(1,1) not null, [reportno] [varchar](50) not null, [srlno] [varchar](50) null, [drawingdimension] [varchar](50) null, [requireddimens...