예제 #1
0
        public void loadData()
        {
            string strsql = "select distinct tap_no,production_date as logtime from cbfiron where production_date >sysdate-1.1 order by production_date desc";
            var    dtiron = MESTool.GetData(Adapter, strsql);

            dataGridView1.DataSource = dtiron;
        }
예제 #2
0
        public void loadData()
        {
            // select materialid,production_date as logtime,gross_weight,curr_tare,net_weight from cbfiron where production_date >sysdate-1.1 order by production_date desc
            string strsql = "select materialid,production_date as logtime,gross_weight,curr_tare,net_weight from cbfiron where production_date >sysdate-1.1 order by production_date desc";
            var    dtiron = MESTool.GetData(Adapter, strsql);

            dataGridView1.DataSource = dtiron;
        }
예제 #3
0
        private void ccmReScrapFrm_Load(object sender, EventArgs e)
        {
            string strsql = " select  materialid from cbloom_data   where status<=9 and status >5   ";

            strsql += " and materialid in (select heatid from cccm_base_data where productiondate > sysdate-1)";
            var dtheatid = MESTool.GetData(Adapter, strsql);

            if (dtheatid != null && dtheatid.Rows.Count > 0)
            {
                for (int i = 0; i < dtheatid.Rows.Count; i++)
                {
                    comboBox1.Items.Add(dtheatid.Rows[i][0].ToString());
                }
            }
        }
예제 #4
0
        /// <summary>
        /// 获取出钢量、终点c
        /// </summary>
        public void getweight()
        {
            string strSql = "select reblow_count,tapping_weight,reblow_time from cbof_process_data where heatid='" + tbheatid.Text.Trim() + "'";
            var    dt     = UnitMag.MESTool.GetData(Adapter, strSql);

            if (dt != null && dt.Rows.Count > 0)
            {
                if (Convert.ToDouble(dt.Rows[0]["tapping_weight"].ToString()) < 10)
                {
                    if (tbheatid.Text.Trim().StartsWith("24"))
                    {
                        tbweight.Text = "78";
                    }
                    else
                    {
                        tbweight.Text = "48";
                    }
                }
                else
                {
                    tbweight.Text    = Math.Round(Convert.ToDouble(dt.Rows[0]["tapping_weight"].ToString()), 3).ToString();
                    tbweight.Enabled = false;
                }

                bc_time        = Convert.ToDouble(dt.Rows[0]["reblow_time"].ToString());
                lbre_time.Text = dt.Rows[0]["reblow_time"].ToString();

                strSql = "select c,si,mn,cr from cqa_lab_element where unittypeid='2' and  heatid='" + tbheatid.Text.Trim() + "' order by sample_count desc";
                var zddb = MESTool.GetData(Adapter, strSql);
                if (zddb != null && zddb.Rows.Count > 0)
                {
                    zd_c          = Convert.ToDouble(zddb.Rows[0][0].ToString());
                    tbzdc.Text    = zddb.Rows[0][0].ToString();
                    tbzdc.Enabled = false;

                    zd_si          = Convert.ToDouble(zddb.Rows[0][1].ToString());
                    tbzdsi.Text    = zddb.Rows[0][1].ToString();
                    tbzdsi.Enabled = false;

                    zd_mn          = Convert.ToDouble(zddb.Rows[0][2].ToString());
                    tbzdmn.Text    = zddb.Rows[0][2].ToString();
                    tbzdmn.Enabled = false;

                    zd_cr          = Convert.ToDouble(zddb.Rows[0][3].ToString());
                    tbzdcr.Text    = zddb.Rows[0][3].ToString();
                    tbzdcr.Enabled = false;
                }

                //补吹时间 大于 0
                if (bc_time > 0)
                {
                    ckbReblow.Checked = true;
                    ckbReblow.Enabled = false;
                    if (Convert.ToDouble(dt.Rows[0]["tapping_weight"].ToString()) > 60)
                    {
                        bc_zd_c  = zd_c - bc_time * 0.01 / 4;
                        bc_zd_mn = zd_mn - bc_time * 0.01 / 8;
                    }
                    else
                    {
                        bc_zd_c  = zd_c - bc_time * 0.01 / 3;
                        bc_zd_mn = zd_mn - bc_time * 0.01 / 8;
                    }
                    if (bc_zd_c < 0.03)
                    {
                        bc_zd_c = 0.03;
                    }

                    if (bc_zd_mn < 0.07)
                    {
                        bc_zd_mn = 0.07;
                    }

                    labelc.Text  = Math.Round(bc_zd_c, 4).ToString();
                    labelmn.Text = Math.Round(bc_zd_mn, 4).ToString();
                }
                else
                {
                    bc_zd_c  = zd_c;
                    bc_zd_mn = zd_mn;

                    labelc.Text  = "";
                    labelmn.Text = "";
                }
            }
        }