iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
When I call js code: sendRuquest(),it show a WebDialogBox1,however,when I click 'X' to close,it cause JS error:URI: http://localhost:1202/Evget_EMS/ISRes.axd?D/WebDesktopManager.js/307200311
how to sovle it ???????thank you .all the code below
jS: function sendRuquest() { var grid = ISGetObject("WebGrid2"); grid.SendCustomRequest();}html:<ISWebDesktop:WebDialogBox ID="WebDialogBox1" runat="server" Height="420px" Width="410px" DialogBoxImage="None"> <WindowSettings> <WindowStyle> <Normal BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" Font-Names="Tahoma" Font-Size="8pt"> </Normal> <Active BaseStyle="Normal" BorderColor="Gray"> </Active> </WindowStyle> <CaptionStyle> <Normal Cursor="Default" BackColor2="Gainsboro" BackColor="Gray" Font-Bold="True" Font-Names="Tahoma" Font-Size="10pt" ForeColor="White"> <Padding Top="2px" Left="2px" Right="2px" Bottom="2px"></Padding> </Normal> <Active BackColor2="192, 192, 255" BaseStyle="Normal" BackColor="Navy"> </Active> </CaptionStyle> <CaptionButtonStyle> <Normal Overflow="Hidden" OverflowY="Hidden" OverflowX="Hidden" BorderColor="White" BorderStyle="Solid" BorderWidth="1px" Height="17px"> </Normal> <Over BaseStyle="Normal"> <BorderSettings> <Bottom Color="Gray"></Bottom> <Right Color="Gray"></Right> </BorderSettings> </Over> <Active BaseStyle="Normal"> <BorderSettings> <Left Color="Gray"></Left> <Top Color="Gray"></Top> </BorderSettings> </Active> </CaptionButtonStyle> <ContainerStyle BackColor="White" Font-Names="Tahoma" Font-Size="8pt" Height="100%" Width="100%"> <Padding Top="4px" Left="4px" Right="4px" Bottom="4px"></Padding> </ContainerStyle> <CommandButtonStyle> <Normal BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False"> </Normal> <Over BaseStyle="Normal" BackColor="#C5C2AF"> </Over> <Active BaseStyle="Normal" BackColor="#8A887B" ForeColor="White"> </Active> </CommandButtonStyle> <CommandButtonDisabledStyle BackgroundImage="" CustomRules="" BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False" ForeColor="Gray"> </CommandButtonDisabledStyle> </WindowSettings> <ContentTemplate> <table width="375px"> <tr> <td width="45px"> 关键字 </td> <td> <ISWebInput:WebInput Width="116px" ID="WebInput1" runat="server"> </ISWebInput:WebInput> </td> <td> <ISWebDesktop:WebButton ID="WebButton2" runat="server" Height="20px" Text="查找" Width="50px" OnClientClick="sendRuquest" AutoPostback="true" PostBackMode="FlyPostBack"> </ISWebDesktop:WebButton> </td> <td width="162px"> </td> </tr> <tr> <td colspan="4"> <ISWebGrid:WebGrid ID="WebGrid2" runat="server" Height="315px" UseDefaultStyle="True" Width="371px" DefaultStyleMode="Elegant" OnInitializeDataSource="WebGrid2_InitializeDataSource" OnInitializePostBack="WebGrid2_InitializePostBack"> <LayoutSettings AlternatingColors="false" AllowContextMenu="False"> <ClientSideEvents OnCellDblClick="DbclickAutoFill()" /> <SelectedRowStyle BackColor="#FFBD69" /> </LayoutSettings> <RootTable DataKeyField="tradecode"> <Columns> <ISWebGrid:WebGridColumn Caption="商品编号" DataMember="tradecode" Name="tradecode" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="商品名称" DataMember="fullname" Name="fullname" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="商品单位" DataMember="unit" Name="unit" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="库存数量" DataMember="qty" DataType="System.Double" Name="qty" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="单价/元" DataFormatString="##,###.00" DataMember="price" DataType="System.Double" Name="price" Width="70px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> </td> </tr> </table> </ContentTemplate> </ISWebDesktop:WebDialogBox>c# protected void WebGrid2_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) { if (e.Action == ISNet.WebUI.WebGrid.PostBackAction.Custom) { WebGrid2.ClientAction.Refresh(); } } protected void WebGrid2_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { e.DataSource = dbcon.getStockByName(WebInput1.Text); }
Hi Frank,
I believe that you need to update to the latest patch. Please kindly tell me what is your build version of WebDesktop and Framework?
I have attached the latest build of each WebDesktop,313 and Framework, 757.
Please refer to http://www.intersoftpt.com/build/applyhotfix for patching the hotfixes manually.
Please let me know if this works well or no.=)
Thank you and have a nice day.
Regards,Niven.
Can everyone help me ?thanks!
I created a simple sample page based on the snippet code shown in your first message. Modification such as WebGrid’s data binding and displaying WebDialogBox were made in order to get the sample runable.
I was unable to reproduce any issue especially when click ‘X’ to close the WebDialogBox. Everything worked smoothly and the page was accessed without any issues.
For your information, WebDesktop.NET 3.0 build 312; WebGrid.NET 7.0 build 406; and WebUI.NET Framework 3.0 build 757 are used during the test.
I enclosed the test page as attachment, please have the test page tested on your end and let us know whether it helps or not. Please make any necessary changes to the sample file so that the issue is reproducible, and then have the sample send back to us to be analyzed.
I have tried your sample and it did not replicated on my side.
Could you explain me what is the output of your error since I cant read chinese language.
And did you use our SmartWebResource? If Im not mistaken the source of the error could be from the Web Resources.
My page has UpdatePanel 、ajaxPro2.0.when I Clear " <asp:ScriptManager ID="ScriptManager2" runat="server" /> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate></ContentTemplate> </asp:UpdatePanel>" it will display normal.But when I refresh the page,it will cause js error: 对象不支持此属性或方法 core.ashx, 行509 字符3
Html: <asp:ScriptManager ID="ScriptManager2" runat="server" /> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <ISWebDesktop:WebDialogBox ID="WebDialogBox1" runat="server" Height="420px" Width="410px" DialogBoxImage="None"> <WindowSettings > <WindowStyle> <Normal BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" Font-Names="Tahoma" Font-Size="8pt"> </Normal> <Active BaseStyle="Normal" BorderColor="Gray"> </Active> </WindowStyle> <CaptionStyle> <Normal Cursor="Default" BackColor2="Gainsboro" BackColor="Gray" Font-Bold="True" Font-Names="Tahoma" Font-Size="10pt" ForeColor="White"> <Padding Top="2px" Left="2px" Right="2px" Bottom="2px"></Padding> </Normal> <Active BackColor2="192, 192, 255" BaseStyle="Normal" BackColor="Navy"> </Active> </CaptionStyle> <CaptionButtonStyle> <Normal Overflow="Hidden" OverflowY="Hidden" OverflowX="Hidden" BorderColor="White" BorderStyle="Solid" BorderWidth="1px" Height="17px"> </Normal> <Over BaseStyle="Normal"> <BorderSettings> <Bottom Color="Gray"></Bottom> <Right Color="Gray"></Right> </BorderSettings> </Over> <Active BaseStyle="Normal"> <BorderSettings> <Left Color="Gray"></Left> <Top Color="Gray"></Top> </BorderSettings> </Active> </CaptionButtonStyle> <ContainerStyle BackColor="White" Font-Names="Tahoma" Font-Size="8pt" Height="100%" Width="100%"> <Padding Top="4px" Left="4px" Right="4px" Bottom="4px"></Padding> </ContainerStyle> <CommandButtonStyle> <Normal BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False"> </Normal> <Over BaseStyle="Normal" BackColor="#C5C2AF"> </Over> <Active BaseStyle="Normal" BackColor="#8A887B" ForeColor="White"> </Active> </CommandButtonStyle> <CommandButtonDisabledStyle BackgroundImage="" CustomRules="" BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False" ForeColor="Gray"> </CommandButtonDisabledStyle> </WindowSettings> <ContentTemplate> <table width="375px"> <tr> <td width="45px"> 关键字 </td> <td> <ISWebInput:WebInput Width="116px" ID="WebInput1" runat="server"> </ISWebInput:WebInput> </td> <td> <ISWebDesktop:WebButton ID="WebButton2" runat="server" Height="20px" Text="查找" Width="50px" OnClientClick="sendRuquest" AutoPostback="true" PostBackMode="FlyPostBack"> </ISWebDesktop:WebButton> </td> <td width="162px" align="right"> <ISWebDesktop:WebButton ID="WebButton4" runat="server" Height="20px" Text="关闭" Width="50px" OnClientClick="closeDialog" > <ButtonStyle Normal-BackColor="White" Normal-BorderWidth="0" Over-BorderWidth="0" Over-BackColor="Red" > </ButtonStyle> </ISWebDesktop:WebButton> </td> </tr> <tr> <td colspan="4"> <ISWebGrid:WebGrid ID="WebGrid2" runat="server" Height="315px" UseDefaultStyle="True" Width="371px" DefaultStyleMode="Elegant" OnInitializeDataSource="WebGrid2_InitializeDataSource" OnInitializePostBack="WebGrid2_InitializePostBack"> <LayoutSettings AlternatingColors="false" AllowContextMenu="False"> <ClientSideEvents OnKeyDown="DbclickAutoFill()" /> <SelectedRowStyle BackColor="#FFBD69" /> </LayoutSettings> <RootTable DataKeyField="tradecode"> <Columns> <ISWebGrid:WebGridColumn Caption="商品编号" DataMember="tradecode" Name="tradecode" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="商品名称" DataMember="fullname" Name="fullname" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="商品单位" DataMember="unit" Name="unit" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="库存数量" DataMember="qty" DataType="System.Double" Name="qty" Width="70px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="单价/元" DataFormatString="##,###.00" DataMember="price" DataType="System.Double" Name="price" Width="70px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> </td> </tr> </table> </ContentTemplate> </ISWebDesktop:WebDialogBox> </ContentTemplate> </asp:UpdatePanel> C# using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class AddBuysBill : System.Web.UI.Page { operateClass.BaseInfo dbcon = new operateClass.BaseInfo(); operateClass.BaseInfo.cBillInfo billinfo = new operateClass.BaseInfo.cBillInfo(); operateClass.BaseInfo.cStockInfo stockinfo = new operateClass.BaseInfo.cStockInfo(); operateClass.BaseInfo.cCurrentAccount currentAccount = new operateClass.BaseInfo.cCurrentAccount(); protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(typeof(AddBuysBill)); if (!IsPostBack) { dbcon.deleteTempStock();//清空进货单临时表 WebInput2.Value = "0"; DataSet ds = null; string P_Str_newBillCode = ""; int P_Int_newBillCode = 0; ds = dbcon.getWarehouseMain(); //获取进货主表 if (ds.Tables[0].Rows.Count == 0) { WebInputId.Text = DateTime.Now.ToString("yyyyMMdd") + "JH" + "1000001"; } else { P_Str_newBillCode = Convert.ToString(ds.Tables[0].Rows[ds.Tables[0].Rows.Count - 1]["billcode"]); P_Int_newBillCode = Convert.ToInt32(P_Str_newBillCode.Substring(10, 7)) + 1; P_Str_newBillCode = DateTime.Now.ToString("yyyyMMdd") + "JH" + P_Int_newBillCode.ToString(); WebInputId.Text = P_Str_newBillCode; } } } protected void WebGrid1_CustomAggregate(object sender, ISNet.WebUI.WebGrid.CustomAggregateArgs e) { double sum1 = 0; double sum2 = 0; double PaySum = 0; if (e.Column.Name == "tsum") { for (int i = 0; i < WebGrid1.RootTable.Rows.Count; i++) { sum1 = Convert.ToDouble(WebGrid1.RootTable.Rows[i].Cells.GetNamedItem("qty").Text); sum2 = Convert.ToDouble(WebGrid1.RootTable.Rows[i].Cells.GetNamedItem("price").Text); PaySum += sum1 * sum2; } e.AggregateResult = PaySum; } } protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { if (e.Row.Type == ISNet.WebUI.WebGrid.RowType.Record) { e.Row.Cells.GetNamedItem("idxBox").Text = (e.Row.Position + 1).ToString(); e.Row.Cells.GetNamedItem("idxBox").Value = (e.Row.Position + 1).ToString(); e.Row.Cells.GetNamedItem("tsum").Text = (Convert.ToDouble(e.Row.Cells.GetNamedItem("qty").Value) * Convert.ToDouble(e.Row.Cells.GetNamedItem("price").Value)).ToString().Trim(); e.Row.Cells.GetNamedItem("tsum").Value = Convert.ToDouble(e.Row.Cells.GetNamedItem("qty").Value) * Convert.ToDouble(e.Row.Cells.GetNamedItem("price").Value); } } protected void WebGrid2_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) { if (e.Action == ISNet.WebUI.WebGrid.PostBackAction.Custom) { WebGrid2.ClientAction.Refresh(); } } protected void WebGrid2_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { e.DataSource = dbcon.getStockByName(WebInput1.Text); } [AjaxPro.AjaxMethod] public int saveBuyBill() { //向进货表(主表)信息 billinfo.BillDate = Convert.ToDateTime(WebInputDate.Text); billinfo.BillCode = WebInputId.Text; billinfo.Handle = WebComName.Text; billinfo.Units = WebComUnit.Text; billinfo.Summary = WebInputSummary.Text; billinfo.FullPayment = Convert.ToSingle(payTxt.Text); billinfo.Payment = Convert.ToSingle(WebInput2.Text); int i = dbcon.AddBuyBill(billinfo); //int i = dbcon.AddBuyBill(); return i; } //保存到进货单主表 [AjaxPro.AjaxMethod] public int saveWaremain(string date, string billcode, string handle, string unit, string summary, double fullpay, double pay) { billinfo.BillDate = Convert.ToDateTime(date); billinfo.BillCode = billcode; billinfo.Handle = handle; billinfo.Units = unit; billinfo.Summary = summary; billinfo.FullPayment = fullpay; billinfo.Payment = pay; int k = dbcon.AddBuyBill(billinfo); return k; } //保存到进货单详细表 [AjaxPro.AjaxMethod] public int saveWareDetail(string billcode, string tradecode, string fullname, string unit, int qty, double price, double tsum, string billdate) { billinfo.BillCode = billcode; billinfo.TradeCode = tradecode; billinfo.FullName = fullname; billinfo.Units = unit; billinfo.Qty = qty; billinfo.Price = price; billinfo.TSum = tsum; billinfo.BillDate = Convert.ToDateTime(billdate); int k = dbcon.AddBilldetail(billinfo); return k; } //更改库存数量和加权平均价格 [AjaxPro.AjaxMethod] public int updateQtyPrice(string tradeCode, int qty, double price) { //billinfo.Qty = 20;/////////////// //billinfo.Price = 50;stockinfo.Price =500;////需要提前设置这3个参数 billinfo.Qty = qty; billinfo.Price = price; stockinfo.TradeCode = tradeCode; DataSet ds = null; ds = dbcon.GetStockByTradeCode(stockinfo); stockinfo.Qty = Convert.ToInt32(ds.Tables[0].Rows[0]["qty"]); stockinfo.Price = Convert.ToInt32(ds.Tables[0].Rows[0]["price"]); stockinfo.AveragePrice = Convert.ToDouble(ds.Tables[0].Rows[0]["averageprice"]); //处理--加权平均价格 if (stockinfo.Price == 0) { stockinfo.AveragePrice = billinfo.Price; //第一次进货时,加权平均价格等于进货价格 stockinfo.Price = billinfo.Price; } else { //加权平均价格=(加权平均价*库存总数量+本次进货价格*本次进货数量)/(库存总数量+本次进货数量) stockinfo.AveragePrice = ((stockinfo.AveragePrice * stockinfo.Qty + billinfo.Price * billinfo.Qty) / (stockinfo.Qty + billinfo.Qty)); } //更新--商品库存数量 stockinfo.Qty = stockinfo.Qty + billinfo.Qty; int k = dbcon.UpdateStock_QtyAndAveragerprice(stockinfo); return k; } //向往来单位明细表--录入数据--这样以来为分析 [AjaxPro.AjaxMethod] public int addCurrentAccount(string date, string billcode, double fullpay, double pay, double balance, string unit) { currentAccount.BillDate = Convert.ToDateTime(date); currentAccount.BillCode = billcode; currentAccount.ReduceGathering = fullpay;//应付 currentAccount.FactReduceGathering = pay;//实付 currentAccount.Balance = balance; currentAccount.Units = unit; //执行添加 int k = dbcon.AddCurrentAccount(currentAccount); return k; } }
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class AddBuysBill : System.Web.UI.Page { operateClass.BaseInfo dbcon = new operateClass.BaseInfo(); operateClass.BaseInfo.cBillInfo billinfo = new operateClass.BaseInfo.cBillInfo(); operateClass.BaseInfo.cStockInfo stockinfo = new operateClass.BaseInfo.cStockInfo(); operateClass.BaseInfo.cCurrentAccount currentAccount = new operateClass.BaseInfo.cCurrentAccount(); protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(typeof(AddBuysBill)); if (!IsPostBack) { dbcon.deleteTempStock();//清空进货单临时表 WebInput2.Value = "0"; DataSet ds = null; string P_Str_newBillCode = ""; int P_Int_newBillCode = 0; ds = dbcon.getWarehouseMain(); //获取进货主表 if (ds.Tables[0].Rows.Count == 0) { WebInputId.Text = DateTime.Now.ToString("yyyyMMdd") + "JH" + "1000001"; } else { P_Str_newBillCode = Convert.ToString(ds.Tables[0].Rows[ds.Tables[0].Rows.Count - 1]["billcode"]); P_Int_newBillCode = Convert.ToInt32(P_Str_newBillCode.Substring(10, 7)) + 1; P_Str_newBillCode = DateTime.Now.ToString("yyyyMMdd") + "JH" + P_Int_newBillCode.ToString(); WebInputId.Text = P_Str_newBillCode; } } } protected void WebGrid1_CustomAggregate(object sender, ISNet.WebUI.WebGrid.CustomAggregateArgs e) { double sum1 = 0; double sum2 = 0; double PaySum = 0; if (e.Column.Name == "tsum") { for (int i = 0; i < WebGrid1.RootTable.Rows.Count; i++) { sum1 = Convert.ToDouble(WebGrid1.RootTable.Rows[i].Cells.GetNamedItem("qty").Text); sum2 = Convert.ToDouble(WebGrid1.RootTable.Rows[i].Cells.GetNamedItem("price").Text); PaySum += sum1 * sum2; } e.AggregateResult = PaySum; } } protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e) { if (e.Row.Type == ISNet.WebUI.WebGrid.RowType.Record) { e.Row.Cells.GetNamedItem("idxBox").Text = (e.Row.Position + 1).ToString(); e.Row.Cells.GetNamedItem("idxBox").Value = (e.Row.Position + 1).ToString(); e.Row.Cells.GetNamedItem("tsum").Text = (Convert.ToDouble(e.Row.Cells.GetNamedItem("qty").Value) * Convert.ToDouble(e.Row.Cells.GetNamedItem("price").Value)).ToString().Trim(); e.Row.Cells.GetNamedItem("tsum").Value = Convert.ToDouble(e.Row.Cells.GetNamedItem("qty").Value) * Convert.ToDouble(e.Row.Cells.GetNamedItem("price").Value); } } protected void WebGrid2_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) { if (e.Action == ISNet.WebUI.WebGrid.PostBackAction.Custom) { WebGrid2.ClientAction.Refresh(); } } protected void WebGrid2_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { e.DataSource = dbcon.getStockByName(WebInput1.Text); } [AjaxPro.AjaxMethod] public int saveBuyBill() { //向进货表(主表)信息 billinfo.BillDate = Convert.ToDateTime(WebInputDate.Text); billinfo.BillCode = WebInputId.Text; billinfo.Handle = WebComName.Text; billinfo.Units = WebComUnit.Text; billinfo.Summary = WebInputSummary.Text; billinfo.FullPayment = Convert.ToSingle(payTxt.Text); billinfo.Payment = Convert.ToSingle(WebInput2.Text); int i = dbcon.AddBuyBill(billinfo); //int i = dbcon.AddBuyBill(); return i; } //保存到进货单主表 [AjaxPro.AjaxMethod] public int saveWaremain(string date, string billcode, string handle, string unit, string summary, double fullpay, double pay) { billinfo.BillDate = Convert.ToDateTime(date); billinfo.BillCode = billcode; billinfo.Handle = handle; billinfo.Units = unit; billinfo.Summary = summary; billinfo.FullPayment = fullpay; billinfo.Payment = pay; int k = dbcon.AddBuyBill(billinfo); return k; } //保存到进货单详细表 [AjaxPro.AjaxMethod] public int saveWareDetail(string billcode, string tradecode, string fullname, string unit, int qty, double price, double tsum, string billdate) { billinfo.BillCode = billcode; billinfo.TradeCode = tradecode; billinfo.FullName = fullname; billinfo.Units = unit; billinfo.Qty = qty; billinfo.Price = price; billinfo.TSum = tsum; billinfo.BillDate = Convert.ToDateTime(billdate); int k = dbcon.AddBilldetail(billinfo); return k; } //更改库存数量和加权平均价格 [AjaxPro.AjaxMethod] public int updateQtyPrice(string tradeCode, int qty, double price) { //billinfo.Qty = 20;/////////////// //billinfo.Price = 50;stockinfo.Price =500;////需要提前设置这3个参数 billinfo.Qty = qty; billinfo.Price = price; stockinfo.TradeCode = tradeCode; DataSet ds = null; ds = dbcon.GetStockByTradeCode(stockinfo); stockinfo.Qty = Convert.ToInt32(ds.Tables[0].Rows[0]["qty"]); stockinfo.Price = Convert.ToInt32(ds.Tables[0].Rows[0]["price"]); stockinfo.AveragePrice = Convert.ToDouble(ds.Tables[0].Rows[0]["averageprice"]); //处理--加权平均价格 if (stockinfo.Price == 0) { stockinfo.AveragePrice = billinfo.Price; //第一次进货时,加权平均价格等于进货价格 stockinfo.Price = billinfo.Price; } else { //加权平均价格=(加权平均价*库存总数量+本次进货价格*本次进货数量)/(库存总数量+本次进货数量) stockinfo.AveragePrice = ((stockinfo.AveragePrice * stockinfo.Qty + billinfo.Price * billinfo.Qty) / (stockinfo.Qty + billinfo.Qty)); } //更新--商品库存数量 stockinfo.Qty = stockinfo.Qty + billinfo.Qty; int k = dbcon.UpdateStock_QtyAndAveragerprice(stockinfo); return k; } //向往来单位明细表--录入数据--这样以来为分析 [AjaxPro.AjaxMethod] public int addCurrentAccount(string date, string billcode, double fullpay, double pay, double balance, string unit) { currentAccount.BillDate = Convert.ToDateTime(date); currentAccount.BillCode = billcode; currentAccount.ReduceGathering = fullpay;//应付 currentAccount.FactReduceGathering = pay;//实付 currentAccount.Balance = balance; currentAccount.Units = unit; //执行添加 int k = dbcon.AddCurrentAccount(currentAccount); return k; } }
I have attached a sample of mine. Please let me know if my sample works on your side perfectly or not.
If my sample did not met your scenario please change my sample until the issue can be replicated and send it back to me again therefore I can investigate more further regarding your issue.
Hope this helps.
I am sorry,your demo can not meet my need.I have attached a issue demo below.Please correct it ,Thank you.
I still dont find an issue on my side even when I use your given sample.
May I know what version of Visual Studio and WebDesktop build are you using? I'm using Visual Studio 2010 and WebDesktop build 3.0.7200.312.
I believe that the .Net version is the source of the problem. Currently, I'm using .Net version 4.
Since I still cant replicate the issue on my side, would you mind telling me which line and what code that VS find as an error?
Thank you.
The things I have done:1、I have used VS2008,VS2010 Tested,It causes wrong,too.2、I have used other people's Computer Tested,It causes wrong,too.I find that it caused wrong On IE(it runs normal on FF)the wrong Information: ISRes.axd?D/WebDesktopManager.js/307200311 ; if (btnEl) { if (btnEl ==v56542 ||btnEl.contains(v56542))
Please Test the Demo on IE8.0.
When you close the 'X',It will cause js wrong,
(I am sure it causes Js wrong By UpdatePannal,when I remove <asp:ScriptManager ID="ScriptManager2" runat="server" /> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> ...... </ContentTemplate> </asp:UpdatePanel> it will not cause js wrong.)
Hi,
May I know your build version of WebDesktop and Framework did you use?
Where did you develop your application? 2008 or 2010?
Have your tried to develop it using the .Net 4 version? I believe you are still using 3.5.
I still dont get a problem with the close button of WebDialogBox. I will try to upload the video.
Thank you and have a nice weekend.
I have used .netframework4.0+VS2010.When the demo runs,It causes js wrong,too.Please check the attach file.
ISRes.axd?D/WebDesktopManager.js/307200311 ; if (btnEl) { if (btnEl ==v56542 ||btnEl.contains(v56542))
Please see the attached video.
Im testing it on VS2008.
Niven Prasetya,Thank you for your patience. But the problem does not solve,too.I have no idea what to do.I test on serval machines,but it causes error,too.
So strange!!!!!!!!!
Anyone can help me if you have met???????
The Man has met the same issue:http://www.intersoftpt.com/Community/WebDesktop/Javascript-error-when-trying-to-close-web-dialog-box/
webdeskTop.net 3.0.7200
Please let me know the last 3 digits of your build version.
ex: WebDesktop 3.0.7200.xxx
Niven.
WebDesktop 3.0.7200.311
thank you, Niven Prasetya!I have fix the bug with your hotfixes!
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname