Jump to content
Xtreme .Net Talk

wondery

Avatar/Signature
  • Posts

    44
  • Joined

  • Last visited

Everything posted by wondery

  1. <%@ Control Language="c#" AutoEventWireup="false" Codebehind="logo.ascx.cs" Inherits="car.logo" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> <asp:Repeater id="repeater1" runat="server"> <ItemTemplate> <table> <tr> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> <td><a href=list.aspx?BrandName='<%#DataBinder.Eval(Container.DataItem, "BrandName")%>'><img src='logo/<%#DataBinder.Eval(Container.DataItem, "Logo")%>' border="0"></a> </td> </tr> <tr> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> <td class=smallfont><%#DataBinder.Eval(Container.DataItem, "BrandName")%> </td> </tr></table> </ItemTemplate> </asp:Repeater> almost but some prob ... it dont movenext how to ?
  2. how to ? table that contain 10 cols and begin to new row ...
  3. sorry i miss but it error when i call class from signout inventory.deletecookies DelCok = new deletecookies(); DelCok.DelCookies();
  4. this is class that i using for del cookies and i want to using it again in signout but it do nothing what i miss ? here is signout.cs.aspx namespace inventory { public class deletecookies : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { DelCookies(); } public void DelCookies() { Session["User"] = null; Session["PrintAble"] = null; Session["SearchAble"] = null; Session["Sales"] = null; Session["Dye"] = null; Session["Package"] = null; Session["Delivery"] = null; HttpCookieCollection cookieCols = Request.Cookies; cookieCols = Request.Cookies; if (Request.Cookies["cookieCols"]!=null) { for(int n=0;n<cookieCols.Count;n++) { string UID = Request.Cookies["UID"].Value; string PASS = Request.Cookies["PASS"].Value; } } HttpCookie cookie = new HttpCookie("UID"); cookie.Expires = DateTime.Now; Response.Cookies.Add(cookie); cookie = new HttpCookie("PASS"); cookie.Expires = DateTime.Now; Response.Cookies.Add(cookie); string sScript = ""; sScript += "<script language=javascript>"; sScript += " window.open('index.aspx','_parent');"; sScript += "</script>"; Response.Write(sScript); } } } here is signout.cs.aspx namespace inventory { public class signout : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { deletecookies mc = new deletecookies(); } } } }
  5. i using command datetime.now and it return 17/11/2546 but in window system and sqlServer accept in 11/17/2003 so it get out of range problem in my computer using same customer's computer setting in reginal setting ... my computer is fine and normal working but in customer's computer get this problem how slove ? in c# command datetime.now get date value from reginal setting, right ? thanx
  6. all textbox in table and i use table in webform now i use this code it not go into loop what i'm wrong foreach(Control t in this.Controls) { if (t is Table) ((Table) t).Visible = false; }
  7. how to ? more explain please
  8. D:\My Documents\inventory\customerlist.aspx.cs(183): 'System.Web.UI.WebControls.TextBox' does not contain a definition for 'Name' it show this ...
  9. i cant find compile command where is it ? i want to make my windows form (c#) to exe
  10. i want to get feild name in table and it will greater if can get table name from database too...
  11. i want to using 3 label only i cant use 7 label i do letter that have 3 paragraph
  12. i bind database into label it shold be 1.Trademark 2.Application No 3.Date of Filing 4.Registration No. 5.Class No. 6.List of Goods 7.Registrant but it be 1.Trademark 2.Application No 3.Date of Filing 4.Registration No. 5.Class No. 6.List of Goods 7.Registrant i guess it shoud use replace but i dont know how to replace... or else can slove this ?
  13. i want to create address label and if i create 1 record in 1 row it loose many white paper in right side so i try to create in next column but i dont want to using loop in table like asp so i want to do in grid if it can but i dont know how to do ! T__T
  14. it will enter new row but i want it to display in next column until 5 record then go to new row can i do ?
  15. i found that it cant it must write function in excel had function to convert number to money word please follow this http://www.xtremedotnettalk.com/t78384.html now i can do at this but a little problem ... must slove
  16. HELP! HELP! HELP ME PLEASE >> i found this code and edit it but some bug about number i call it like this double NetTotal = ((SubTotal-Advance)+TRate)+Vat; lblNetTotal.Text = NetTotal.ToString("###,###,##0.00"); fs(NetTotal); and this is fs function public void fs(double allNum) { string firstNum=Convert.ToString(allNum); ArrayList al = new ArrayList(); string[] parts = firstNum.Split('.'); al.InsertRange(0,parts); int countArray = 0; foreach(string a in al) { countArray +=1; if (countArray==1) { double NetFirst = Convert.ToDouble(a); lblToText.Text = IntegerToWords(NetFirst); } else { double NetSec = Convert.ToDouble(a); lblToText.Text = lblToText.Text + " and " + IntegerToWords(NetSec); } } } and this is interger to word function public string IntegerToWords(double inputNum) { int dig1,dig2,dig3,level=0,lasttwo,threeDigits; string retval = ""; string x = ""; string[] ones={ "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen" }; string[] tens={ "Zero", "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety" }; string[] thou={ "", "Thousand", "Million", "Billion", "Trillion", "Quadrillion", "Quintillion" }; bool isNegative=false; if (inputNum<0) { isNegative=true; inputNum*=-1; } if (inputNum==0) return ("zero"); string s=inputNum.ToString(); while (s.Length>0) { // Get the three rightmost characters x=(s.Length<3) ? s : s.Substring(s.Length - 3, 3); // Separate the three digits threeDigits=int.Parse(x); lasttwo=threeDigits % 100; dig1=threeDigits / 100; dig2=lasttwo / 10; dig3=(threeDigits % 10); // append a "thousand" where appropriate if (level>0 && dig1+dig2+dig3>0) { retval=thou[level] + " " + retval; retval=retval.Trim(); } // check that the last two digits is nonzero if (lasttwo>0) { if (lasttwo<20) // if less than 20, use "ones" only retval=ones[lasttwo] + " " + retval; else // otherwise, use both "tens" and "ones" array retval=tens[dig2] + " " + ones[dig3] + " " + retval; } // if a hundreds part is there, translate it if (dig1>0) retval = ones[dig1] + " hundred " + retval; s=(s.Length - 3)>0 ? s.Substring(0,s.Length - 3) : ""; level++; } while (retval.IndexOf(" ")>0) retval=retval.Replace(" "," "); retval=retval.Trim(); if (isNegative) retval="negative " + retval; return (retval); } problem is if number is 4,846.03 it will convert to Four Thousand Eight hundred Forty Six and Three and it should be Four Thousand Eight hundred Forty Six and Zero Three ,right ? please help!!!
  17. which function ?
  18. ok i done lblTRate.Text = TRate.ToString("###,###,##0.00"); thank a lot
  19. i do double TRate = Convert.ToDouble((Fee*Rate).ToString("###,###,##0.00")); right ? it return 135 same above
  20. it error Could not locate entry in sysdatabases for database 'newattorney'. No entry found with that name. Make sure that the name is entered correctly. BACKUP DATABASE is terminating abnormally. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Could not locate entry in sysdatabases for database 'newattorney'. No entry found with that name. Make sure that the name is entered correctly. BACKUP DATABASE is terminating abnormally. System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(); System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(); //Open connection as per usual conn.ConnectionString="Data Source=.;Initial Catalog=attorney;uid=sa;password=xxx"; conn.Open(); //backup database cmd.Connection=conn; cmd.CommandText="BACKUP DATABASE newattorney TO DISK = '" + Server.MapPath("backup/") + "'"; cmd.ExecuteNonQuery();
  21. my code is double Fee = Convert.ToDouble(dv3[0].Row[9].ToString()); lblFeeRate.Text = Fee.ToString(); double Rate = Convert.ToDouble(dv3[0].Row[10].ToString()); lblItem.Text = Rate.ToString(); double TRate = Convert.ToDouble(Fee*Rate); it retrun 135 and i want 135.00 how to ? thank for advance
  22. ok it work but loose decimal
  23. i want lblSubTotal.Text-lblAdvance.Text but it not allow me .... i dont know y ?? please help
×
×
  • Create New...