private void bGetCardInfo_Click(object sender, EventArgs e) { unsafe { byte CardType = 0; byte[] Uid = new byte[10]; byte UidSize = 0; status = uFCoder.GetCardIdEx(&CardType, Uid, &UidSize); uFCoder.GetDlogicCardType(&CardType); LabelStatus.Text = uFCoder.status2str(status); if (status == 0) { UIDTextBox.TextAlign = HorizontalAlignment.Center; UidLengthTextBox.TextAlign = HorizontalAlignment.Center; CardTypeTextBox.TextAlign = HorizontalAlignment.Center; UIDTextBox.Text = "[" + BitConverter.ToString(Uid).Replace("-", ":") + "]"; UidLengthTextBox.Text = "[" + UidSize.ToString() + " bytes]"; CardTypeTextBox.Text = "[" + GetDlTypeName(CardType) + "]"; } else { UIDTextBox.Clear(); CardTypeTextBox.Clear(); UidLengthTextBox.Clear(); } } }
void EnterUIDTextBOX() { if (UIDTextBox.Text != "") { //OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + Server.MapPath("~/test/Access//Tablas.mdb")); con.Open(); OleDbDataAdapter ad = new OleDbDataAdapter("SELECT ArtOrd,PieOrd,(PieOrd-EntCli) AS Pending FROM [Ordenes de fabricación] WHERE NumOrd = " + UIDTextBox.Text + " ", con); DataTable dt = new DataTable(); ad.Fill(dt); con.Close(); if (dt.Rows.Count > 0) { ArticleTextBox.Text = dt.Rows[0][0].ToString(); OrderQtyTextbox.Text = dt.Rows[0][1].ToString(); //IframePdf.Attributes.Add("src", "Drawing.aspx?UID=" + UIDTextBox.Text + "&Article=" + ArticleTextBox.Text + "&testdrawing= kkk"); StepTextBox.Focus(); } else { string script = "alert('Please Enter Valid UID....!!!')"; System.Web.UI.ScriptManager.RegisterClientScriptBlock(UIDEnter, this.GetType(), "Test", script, true); UIDTextBox.Text = string.Empty; UIDTextBox.Focus(); } //if (PendingTextBox.Text != Convert.ToString(0)) //{ // StepTextBox.Focus(); //} } }
protected void StartButton_Click(object sender, EventArgs e) { if (OperatorNameTextBox.Text != "") { StartDateTextBox.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); if (UIDTextBox.Text == "") { UIDTextBox.Focus(); } } }
private void creditButton_Click(object sender, EventArgs e) { errorProvider1.Clear(); if (UIDTextBox.Text == string.Empty) { UIDTextBox.Focus(); errorProvider1.SetError(UIDTextBox, "Can't be empty"); return; } if (amountTextBox.Text == string.Empty) { amountTextBox.Focus(); errorProvider1.SetError(amountTextBox, "Can't be empty"); return; } var account = client.DisplayAccountByUID(int.Parse(UIDTextBox.Text)); if (account == null) { UIDTextBox.Focus(); errorProvider1.SetError(UIDTextBox, "Account not found"); return; } if (!client.LoadWithUID(int.Parse(UIDTextBox.Text), decimal.Parse(amountTextBox.Text))) { UIDTextBox.Focus(); errorProvider1.SetError(UIDTextBox, "Credit error, please retry"); return; } var newAccount = client.DisplayAccountByUID(int.Parse(UIDTextBox.Text)); if (newAccount == null) { UIDTextBox.Focus(); errorProvider1.SetError(UIDTextBox, "Account not found"); return; } usernameRespTextBox.Text = account.Username; amountRespTextBox.Text = account.Amount.ToString(); amountCreditRespTextBox.Text = amountTextBox.Text; newAmountTextBox.Text = newAccount.Amount.ToString(); }
private void searchUIDButton_Click(object sender, EventArgs e) { errorProvider1.Clear(); if (UIDTextBox.Text == string.Empty) { UIDTextBox.Focus(); errorProvider1.SetError(UIDTextBox, "Can't be empty"); return; } var account = client.DisplayAccountByUID(int.Parse(UIDTextBox.Text)); if (account == null) { UIDTextBox.Focus(); errorProvider1.SetError(UIDTextBox, "Account not found"); return; } usernameRespTextBox.Text = account.Username; amountRespTextBox.Text = account.Amount.ToString(); }