Commit fe40280a authored by kshinde's avatar kshinde

Price list WIzard updated component xsl and js

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@176916 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6ddd1e4d
......@@ -754,6 +754,18 @@ public class PricelistGenWizEJB extends ValidatorEJB implements PricelistGenWizE
System.out.println("retXMLStr["+retXMLStr+"] for action ["+action+"]");
}
else if("DELETE".equalsIgnoreCase(action))
{
String loginUser="";
loginUser=(String)reqParamMap.get("loginUser");
System.out.println("Current loginUser"+loginUser);
retXMLStr=deleteCurr(loginUser);
System.out.println("Delete"+retXMLStr);
}
}
catch(Exception e)
......@@ -866,6 +878,48 @@ public class PricelistGenWizEJB extends ValidatorEJB implements PricelistGenWizE
return msgType;
}
public String deleteCurr(String loginUser) throws ITMException
{
PreparedStatement pstmt=null;
ResultSet rs=null;
Connection conn=null;
int hdelcnt=0,detdelcnt=0;
try
{
conn=getConnection();
String sqldel = "DELETE FROM PRICING_MANAGE WHERE chg_user = ? ";
pstmt=conn.prepareStatement(sqldel);
pstmt.setString(1,loginUser);
hdelcnt=pstmt.executeUpdate();
pstmt.close();
pstmt=null;
String sqldeldet = "DELETE FROM PRICING_MANAGE_LIST WHERE chg_user = ? ";
pstmt=conn.prepareStatement(sqldeldet);
pstmt.setString(1,loginUser);
detdelcnt=pstmt.executeUpdate();
pstmt.close();
pstmt=null;
if(hdelcnt>0 && detdelcnt>0)
{
System.out.println("Connection Commited");
conn.commit();
return "Success";
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return "ERROR";
}
@SuppressWarnings("unchecked")
public HashMap<String,ArrayList<HashMap<String,String>>> insertDB(Document dom,Document dom1,Document dom2,String loginUser,String xtraParams,Connection conn) throws SQLException
{
......
......@@ -1038,4 +1038,29 @@ function alingNumberTD()
}
}
}
function resetForm()
{
alert("in reset form");
document.getElementById("plistgenWizForm1").reset();
}
function callDelete()
{
var answer = confirm("Do you want to Reset?")
if (answer) {
var url = servletUrl+"action=DELETE";
makeRequest(url, dataDeleted);
window.location.href = "E12WizardPage.jsp?OBJ_NAME=plistgen_wiz&FORM_NO=1";
}
else {
}
}
function dataDeleted(retdata){
console.log(retdata);
}
......@@ -190,7 +190,7 @@
</td>
</tr>
<tr>
<tr style="display:none;">
<td class="td_rightAlign" nowrap="true" valign="middle" >
<input type="radio" name="offer" onClick="enableTextBox('discount');" id="Detail1.{normalize-space($dbID)}.discount" />
</td>
......@@ -206,6 +206,7 @@
<input type="hidden" value="1" name="FORM_NO" ID="FORM_NO" />
<input type="hidden" value="plistgen_wiz" name="OBJ_NAME" />
<input type="hidden" value="next" name="action" id="action" />
<input type="button" style="cursor:hand;margin-left:5px;" value="Reset" onclick="callDelete();" class="button" title='Reset' id="reset"/>
<input type="submit" style="cursor:hand;margin-left:2px;" value="Next" onclick="setActionVal('next');return validateHeaderForm();" class="button" title='Next' id="next"/>
</div>
</div>
......
......@@ -125,7 +125,7 @@
<div id="sideImagePanel" class="imagePanel"></div>
<div id="popHelpContainer"></div>
<div id="overlay"></div>
<div id="mainPageHeaderContatiner">
<div id="mainPageHeaderContatiner" style=" margin-left: 5px; margin-right: 5px;">
<div id="detailPage-input-Container">
<xsl:for-each select="//Detail2">
<xsl:variable name="dbID"><xsl:value-of select="@domID"/></xsl:variable>
......
......@@ -94,7 +94,7 @@
<div id="sideImagePanel" class="imagePanel"></div>
<div id="popHelpContainer"></div>
<div id="overlay"></div>
<div id="mainPageHeaderContatiner">
<div id="mainPageHeaderContatiner" style=" margin-left: 5px; margin-right: 5px;">
<div id="detailPage-input-Container">
<table class = "tableClass" id="plistTable">
<thead class="table-head">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment