Example #1
0
        //修改
        private void dvBOFData_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                string HeatID  = dvBOFData.Rows[e.RowIndex].Cells[0].Value.ToString();
                bool   check   = false;
                bool   bLocked = false;

                //数据维护
                if (cxCheckFlag.Checked)
                {
                    check = true;
                }

                //实绩锁定标志
                if (Convert.ToBoolean(dvBOFData.Rows[e.RowIndex].Cells[Locked.Index].Value))
                {
                    bLocked = true;
                }

                MELTHeatInfoFrm frmBOFHeatInfo = new MELTHeatInfoFrm();
                frmBOFHeatInfo.ShowDialogEx(Adapter.Session, bLocked, check, HeatID, false);
                GC.Collect();
            }
            catch { }
        }
Example #2
0
        //实绩确认
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            //  [12/25/2008 sun][2009-04-02 Liao]
            string strHeat = dvBOFData.CurrentRow.Cells["HeatID"].Value.ToString();

            /******Modify By Huyunhai 2011-03-26*****/
            dsTempt.Clear();
            dsTempt.SourceMethod = "select a.CASTERID,a.HEATID,b.TAPPING_WEIGHT from CPLAN_TAPPING a,CMELT_Process_Data b where a.HEATID=b.HEATID and a.HEATID='" + strHeat + "'";
            dsTempt.LoadData();
            if (dsTempt.Tables[0].Rows.Count > 0)
            {
                if ((dsTempt.Tables[0].Rows[0]["CASTERID"].ToString() == "S66") && Convert.ToInt32(dsTempt.Tables[0].Rows[0]["TAPPING_WEIGHT"]) == 0)
                {
                    MessageBox.Show("不能实绩确认,请输入出钢量并保存!", "提示");
                    try
                    {
                        string HeatID  = dvBOFData.CurrentRow.Cells[0].Value.ToString();
                        bool   check   = false;
                        bool   bLocked = false;

                        //数据维护
                        if (cxCheckFlag.Checked)
                        {
                            check = true;
                        }

                        //实绩锁定标志
                        if (Convert.ToBoolean(dvBOFData.CurrentRow.Cells[Locked.Index].Value))
                        {
                            bLocked = true;
                        }

                        MELTHeatInfoFrm frmBOFHeatInfo = new MELTHeatInfoFrm();
                        frmBOFHeatInfo.ShowDialogEx(Adapter.Session, bLocked, check, HeatID, true);
                        GC.Collect();
                    }
                    catch { }
                }

                else
                {
                    /******Modify End*******/
                    try
                    {
                        string strYesNo = MessageBox.Show("确认炉号为:\"" + strHeat + "\"的实绩?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                        if (strYesNo == "Yes")
                        {
                            cmdConfirm.Parameters[0].ConstantValue = "S5" + strHeat.Substring(1, 1);
                            cmdConfirm.Parameters[1].ConstantValue = strHeat;
                            cmdConfirm.Parameters[2].ConstantValue = strHeat;
                            cmdConfirm.Execute();
                        }
                        //dsBOFData.LoadData();
                    }
                    catch { }
                }
            }
        }