예제 #1
0
    protected void DropOperation_SelectedIndexChanged(object sender, EventArgs e)
    {
        DBServer Db = new DBServer();
        DataSet  ds = new DataSet();

        Db.PartNo  = DropPartNo.SelectedItem.Text;
        Db.Process = DropOperation.SelectedItem.Text;
        ds         = Db.ViewTimeMasterByQry(Db);
        if (ds.Tables[0].Rows.Count > 0)
        {
            tt = Convert.ToDouble(ds.Tables[0].Rows[0].ItemArray[0].ToString());

            s           = Convert.ToDouble(ds.Tables[0].Rows[0].ItemArray[1].ToString());
            TextTt.Text = Convert.ToString(s);
        }
        ds         = new DataSet();
        Db.PartNo  = DropPartNo.SelectedItem.Text;
        Db.Process = DropOperation.SelectedItem.Value.ToString();
        ds         = Db.ViewTimePlanned(Db);
        if (ds.Tables[0].Rows.Count > 0)
        {
            TXTPreventive.Text = ds.Tables[0].Rows[0]["Maintenance"].ToString();
            int tea = Convert.ToInt32(ds.Tables[0].Rows[0]["LunchTime"].ToString()) + Convert.ToInt32(ds.Tables[0].Rows[0]["TeaTime"].ToString());
            Txtbreak.Text       = tea.ToString();
            TxtPlan.Text        = ds.Tables[0].Rows[0]["PlanTime"].ToString();
            TxtPlannedEngg.Text = ds.Tables[0].Rows[0]["Manufacturing"].ToString();
            TxtMeetings.Text    = ds.Tables[0].Rows[0]["Meeting"].ToString();
            txt_setup.Text      = ds.Tables[0].Rows[0]["Setup"].ToString();
            txt_shift.Text      = ds.Tables[0].Rows[0]["ShiftTime"].ToString();
            //  ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "getRejection();", true);
        }
        else
        {
            TXTPreventive.Text  = "";
            Txtbreak.Text       = "";
            TxtPlan.Text        = "";
            TxtPlannedEngg.Text = "";
            TxtMeetings.Text    = "";
            txt_setup.Text      = "";
            txt_shift.Text      = "";
            //ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Please Enter The Bottle Neck Time In Time Master');", true);
        }
    }