コード例 #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();

            //}
        }
    }
コード例 #2
0
 public RefactorDialog(string stepText)
 {
     InitializeComponent();
     StepTextBox.Text = stepText;
     StepTextBox.Focus();
     StepTextBox.SelectAll();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
コード例 #3
0
    protected void StepEnter_Click(object sender, EventArgs e)
    {
        //IframePdf.Attributes.Add("src", "Drawing.aspx?UID=" + UIDTextBox.Text + "&Article=" + ArticleTextBox.Text + "&Passcode=Anu");

        if (StepTextBox.Text != "")
        {
            ////OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + Server.MapPath("~/test/Access//Tablas.mdb"));
            con.Open();
            OleDbDataAdapter ad1 = new OleDbDataAdapter("SELECT  Operac FROM  [Fases estandards] WHERE NumFas = " + StepTextBox.Text + "  ", con);
            DataTable        dt  = new DataTable();
            ad1.Fill(dt);

            if (dt.Rows.Count > 0)
            {
                OperationTextBox.Text = dt.Rows[0][0].ToString();
                OleDbDataAdapter adnew = new OleDbDataAdapter("SELECT SUM(CanPie) FROM  [Ordenes de fabricación (historia/taller)] WHERE NumOrd = " + UIDTextBox.Text + " AND NumFas =" + StepTextBox.Text + "  ", con);
                DataTable        dtnew = new DataTable();
                adnew.Fill(dtnew);
                con.Close();
                if (dtnew.Rows.Count > 0 && dtnew.Rows[0][0].ToString() != "")
                {
                    FinishedTextBox.Text = dtnew.Rows[0][0].ToString();
                }
                else
                {
                    FinishedTextBox.Text = "0";
                }



                PendingTextBox.Text = Convert.ToString(Convert.ToInt32(OrderQtyTextbox.Text) - Convert.ToInt32(FinishedTextBox.Text));



                MachineNumTextBox.Focus();
            }


            else
            {
                StepTextBox.Focus();
            }
        }
    }