|
yes you just need to consume the results in your windows application as you need them
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
but i can't find codes about store procedure and view. couse i am beginner programmer could you help me?
|
|
|
|
|
Are you using something like Entity Framework to connect to your database or Linq2SQL?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Hi,
I working with Ajax AutoCompleteExtender. I am able to get values from database through AutoCompleteExtender and show it in the target textbox.
Now, I am trying to do this:
If a user enters a new value which is not populated from database,
redirect the user to page in which the details can be entered.
I am trying to do with hidden field, but not getting it.
Please help.
|
|
|
|
|
I am trying to page my results. However, my Next Link and my Last Link always bring up my first page. I cannot get to the second page of results.
Might anyone have any idea as to what I am doing wrong?
namespace ClassesnWorkshops
{
public partial class _Default : System.Web.UI.Page
{
#region Web Form Designer generated code
protected System.Web.UI.WebControls.RadioButton rdoProduct;
protected System.Web.UI.WebControls.Image Image1;
private void InitializeComponent()
{
this.cmdSearch.Click += new System.EventHandler(this.cmdSearch_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
#region "Local Variables and Declarations"
private const bool blnAllowPaging = true;
private const int iPageSize = 5;
PagedDataSource pgdProducts = new PagedDataSource();
#endregion
#region Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
rptClasses.Visible = false;
lblMessage.Text = "";
lblCurrentPage.Visible = true;
lnkNext.Visible = true;
lnkPrevious.Visible = true;
cboWithin.Items.Add("Only this zip");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "0";
cboWithin.Items.Add("5 miles");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "5";
cboWithin.Items.Add("10 miles");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "10";
cboWithin.Items.Add("25 miles");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "25";
cboWithin.Items.Add("50 miles");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "50";
cboWithin.Items.Add("100 miles");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "100";
cboWithin.Items.Add("200 miles");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "200";
cboWithin.Items.Add("No limit");
cboWithin.Items[cboWithin.Items.Count - 1].Value = "999";
}
}
#endregion
#region "Footer LinkButtons"
protected void lnkFirst_Click(object sender, EventArgs e)
{
NowViewing = 0;
BindRepeater();
}
protected void lnkPrev_Click(object sender, EventArgs e)
{
NowViewing--;
BindRepeater();
}
protected void lnkNext_Click(object sender, EventArgs e)
{
NowViewing++;
BindRepeater();
}
protected void lnkLast_Click(object sender, EventArgs e)
{
NowViewing = pgdProducts.PageCount - 1;
BindRepeater();
}
#endregion
#region "Footer DropDownList"
protected void ddlpageNumbers_SelectedIndexChanged(object sender, EventArgs e)
{
NowViewing = ddlpageNumbers.SelectedIndex;
BindRepeater();
}
#endregion
#region "Custom Functions"
private void BindRepeater()
{
pgdProducts.AllowPaging = blnAllowPaging;
pgdProducts.PageSize = iPageSize;
pgdProducts.DataSource = GetProductsDataView();
pgdProducts.CurrentPageIndex = NowViewing;
FillPagesDropDownList(pgdProducts.PageCount);
lblCurrentPage.Text = "Now Showing Page " + (NowViewing + 1).ToString() + " of " + pgdProducts.PageCount.ToString();
lblItemsPerPage.Text = (pgdProducts.Count).ToString() + " items per page.";
lblTotalItemCount.Text = (pgdProducts.DataSourceCount).ToString() + " total number of items that your search returned.";
lnkFirst.Enabled = !pgdProducts.IsFirstPage;
lnkPrevious.Enabled = !pgdProducts.IsFirstPage;
lnkNext.Enabled = !pgdProducts.IsLastPage;
lnkLast.Enabled = !pgdProducts.IsLastPage;
ddlpageNumbers.SelectedIndex = pgdProducts.CurrentPageIndex;
rptClasses.DataSource = pgdProducts;
rptClasses.DataBind();
}
private DataView GetProductsDataView()
{
DataTable dtProductsTemp = new DataTable();
using (SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["ConnStr"]))
{
using (SqlDataAdapter adapProducts = new SqlDataAdapter("cmd", conn))
{
SqlParameter[] arParms = new SqlParameter[3];
arParms[0] = new SqlParameter("@Zipcode", SqlDbType.Char);
arParms[0].Value = txtZipCode.Text;
arParms[1] = new SqlParameter("@Miles", SqlDbType.Decimal);
arParms[1].Value = Int16.Parse(cboWithin.SelectedItem.Value);
arParms[2] = new SqlParameter("@Subject", SqlDbType.Char);
arParms[2].Value = txtSearchWords.Text;
DataSet ds = new DataSet();
ds = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["ClassesnWorkshops.Properties.Settings.ConnectionString"].ConnectionString,
CommandType.StoredProcedure, "spHouses_GetNearZipcode", arParms);
dtProductsTemp = ds.Tables[0];
}
}
return dtProductsTemp.DefaultView;
}
private void FillPagesDropDownList(int iTotalPages)
{
ddlpageNumbers.Items.Clear();
for (int i = 1; i <= iTotalPages; i++)
{
ddlpageNumbers.Items.Add(new ListItem(i.ToString(), i.ToString()));
}
}
#endregion
#region "Properties"
private int NowViewing
{
get
{
object obj = ViewState["_NowViewing"];
if (obj == null)
return 0;
else
return (int)obj;
}
set
{
this.ViewState["_NowViewing"] = value;
}
}
#endregion
#region cmdSearch_Click
protected void cmdSearch_Click(object sender, EventArgs e)
{
DataTable objDT = null;
try
{
objDT = GetProductsDataView().ToTable();
BindRepeater();
if (objDT.Rows.Count == 0)
{
rptClasses.Visible = false;
lblMessage.Text = "No results found";
}
else
{
rptClasses.Visible = true;
lblMessage.Text = "";
}
}
catch (Exception ex)
{
lblMessage.Text = "Error: " + ex.ToString();
}
finally
{
objDT = null;
}
}
#endregion
}
}
TRS
|
|
|
|
|
I've got it!
It was not so much a code issue, as a VisualStudio.Net issue. I hard coded the Click Event for the lnkNext. For some reason, VisualStudio was ignoring this code, so my Next Link was doing nothing (thus the first page was returned again).
I needed to double click the linkButton control so that Visual Studio automatically created the Click Event for the control. Now it recognizes what the Next Link is supposed to do and gives me page 2!
TRS
|
|
|
|
|
There are not many material boutartifcial immu system , I was wo dering how to impliment it on fraud detection of credit card in detail , and which kind of knowledge will help the most ?
|
|
|
|
|
That's not something that can be answered in a post, or even an article. The answer would be a complete book.
..where did you come across the term? As far as I know, fraud checking is done using checksums and the like.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you very much .that is true but I have read papers , but I find articles much helpful implimintation wise .
|
|
|
|
|
Eddy Vluggen wrote: fraud checking is done using checksums and the like What a simplistic idea! Just think of a freshly stolen credit card which has not yet been reported stolen. Or a "copied" credit card, or some hacker using the credit card number for purchases in the web... Here you'll need some highly sophisticated heuristics.
|
|
|
|
|
Bernhard Hiller wrote: Just think of a freshly stolen credit card which has not yet been reported stolen Cannot be identified, unless you have access to the spending pattern of said customer.
Bernhard Hiller wrote: Here you'll need some highly sophisticated heuristics. I see
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I think you meant "artificial intelligence" systems and not "artificial immune" systems.
As has already been mentioned, this is a wide subject and cannot be explained a reply to your post. I suggest you begin by reading some of the papers and books mentioned in the Reference section on this[^] page.
/ravi
|
|
|
|
|
Thank you for replying .I did meant artificial immune system .it is a technique inspired from the biological immune system .
|
|
|
|
|
Thank you! I just learned something new.
/ravi
|
|
|
|
|
There aren't that many examples out there other than in research papers. Possibly your best bet for getting a head start on things like CLONALG is to have a look at the pseudocode on AISWeb[^]
|
|
|
|
|
Hi,
I am developing an asset management system which needs to print bar code labels for the asset item.
I am using a group id and item id to generate bard code with zero padding
for example :
Group ID: 7
Item ID : 145
Bar Code : 007000145
I would like to ask what's the best bar code symbology to use and which will be readable by most of the bar code readers /. apps?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
Not really anything to do with C#, and information on barcodes is easy to find[^].
|
|
|
|
|
I nearly voted this abuse, and will do so if I come across something similar. You're not "new" here, it ain't the first post.
The "best" is the one that fits your needs the "best".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Depends on a huge number of factors: primarily the physical size of the label you are going to print. If it's only one inch by 1/4 inch, that eliminates a lot of versions.
The link Richard gave you covers a lot of the variants: start there and do some research!
You looking for sympathy?
You'll find it in the dictionary, between sympathomimetic and sympatric
(Page 1788, if it helps)
|
|
|
|
|
Thanks guys
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: I would like to ask what's the best bar code symbology to use
The one your biggest customer uses.
|
|
|
|
|
I think you are already off on the wrong foot: a "bar code" with "other codes" (e.g. group and item id's).
You should simply use a "non-meaningful" sequential number; assigned to each existing and new item; long enough to hold all possible items.
As soon as you use "codes within codes", you will find that:
1) They are too short
2) A pain to maintain
3) Cannot be changed if an item is "grouped" wrong
|
|
|
|