Esempio n. 1
0
    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();

            //}
        }
    }
Esempio n. 2
0
 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();
         }
     }
 }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        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();
        }