Ejemplo n.º 1
0
 private void CBO_KND_SelectedIndexChanged(object sender, EventArgs e)
 {
     SpreadCommon.Gf_Sp_Cls(Sc1);
     TXT_KND.Text = CBO_KND.Text.Substring(0, 1);
     if (TXT_KND.Text == "1")
     {
         Ulabel5.Text = "退判时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "退判原因";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text   = "退判时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text   = "删除时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text     = "退判人员";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text   = "删除人员";
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, true);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, true);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, true);
     }
     else if (TXT_KND.Text == "4")
     {
         Ulabel5.Text = "钢板删除时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "申请原因";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text   = "申请时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text   = "删除时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text     = "申请人员";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text   = "删除人员";
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, false);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, false);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, false);
     }
     else if (TXT_KND.Text == "6")
     {
         Ulabel5.Text = "退入库时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "退入库原因";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text   = "退入库时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text   = "删除时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text     = "退入库人员";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text   = "删除人员";
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, true);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, true);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, true);
     }
     else if (TXT_KND.Text == "8")
     {
         Ulabel5.Text = "强制排产时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "强制排产原因";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text   = "强制排产时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text   = "删除时间";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text     = "强制排产人员";
         ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text   = "删除人员";
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, true);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, true);
         SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, true);
     }
 }
Ejemplo n.º 2
0
        private void ss3_Click(int Col, int ROW)
        {
            int P;
            int iRow;
            int iCol;

            if (ss2.ActiveSheet.RowCount <= 0)
            {
                TXT_MPLATE_NO.Text = "";
                SpreadCommon.Gf_Sp_Cls(Sc3);
                return;
            }

            SDB_SLAB_EDT_SEQ.Text   = ss2.ActiveSheet.Cells[ROW, SS3_SLAB_EDT_SEQ].Text;
            SDB_MPLATE_EDT_SEQ.Text = ss2.ActiveSheet.Cells[ROW, SS3_MPLATE_EDT_SEQ].Text;

            p_Ref(3, 3, false, false);
        }
Ejemplo n.º 3
0
        private void ss1_Click(int Col, int ROW)
        {
            int    C;
            int    M;
            int    iRow;
            int    iCol;
            string SEND_SLAB;

            if (ss1.ActiveSheet.RowCount <= 0)
            {
                SpreadCommon.Gf_Sp_Cls(Sc2);
                SpreadCommon.Gf_Sp_Cls(Sc3);
                return;
            }

            if (opt_from.Checked == true)
            {
                txt_from.Text = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_NO].Text;
                from_y.Text   = ss1.ActiveSheet.Cells[ROW, SS1_L2_SEND].Text;

                sSlab_Edt_Seq_Fr = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_EDT_SEQ].Text;
            }
            else if (opt_to.Checked == true)
            {
                txt_to.Text      = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_NO].Text;
                to_y.Text        = ss1.ActiveSheet.Cells[ROW, SS1_L2_SEND].Text;
                sSlab_Edt_Seq_To = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_EDT_SEQ].Text;
            }
            else if (opt_target.Checked == true)
            {
                txt_target.Text  = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_NO].Text;
                target_y.Text    = ss1.ActiveSheet.Cells[ROW, SS1_L2_SEND].Text;
                sSlab_Edt_Seq_Tg = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_EDT_SEQ].Text;
            }

            //检查L2_SEND是否已为'Y'
            if ((opt_sent.Checked == true | opt_delete.Checked == true))
            {
                if (ss1.ActiveSheet.Cells[ROW, SS1_L2_SEND].Text == "Y")
                {
                    GeneralCommon.Gp_MsgBoxDisplay("板坯号 " + ss1.ActiveSheet.Cells[ROW, SS1_SLAB_NO].Text + " 作业指示已下达!", "I", "提示");

                    if (opt_from.Checked == true)
                    {
                        txt_from.Text    = "";
                        from_y.Text      = "";
                        sSlab_Edt_Seq_Fr = "0";
                    }
                    else if (opt_to.Checked == true)
                    {
                        txt_to.Text      = "";
                        to_y.Text        = "";
                        sSlab_Edt_Seq_To = "0";
                    }
                    else if (opt_target.Checked == true)
                    {
                        txt_target.Text  = "";
                        target_y.Text    = "";
                        sSlab_Edt_Seq_Tg = "0";
                    }
                    return;
                }
            }

            //检查是否已入炉
            if (ss1.ActiveSheet.Cells[ROW, SS1_PRC_STS].Text == "B" & (opt_sent.Checked == true | opt_move.Checked == true | opt_cancel.Checked == true | opt_delete.Checked == true))
            {
                GeneralCommon.Gp_MsgBoxDisplay("板坯号 " + ss1.ActiveSheet.Cells[ROW, SS1_SLAB_NO].Text + " 已入炉,不能调整!", "I", "提示");
                if (opt_from.Checked == true)
                {
                    txt_from.Text    = "";
                    from_y.Text      = "";
                    sSlab_Edt_Seq_Fr = "0";
                }
                else if (opt_to.Checked == true)
                {
                    txt_to.Text      = "";
                    to_y.Text        = "";
                    sSlab_Edt_Seq_To = "0";
                }
                else if (opt_target.Checked == true)
                {
                    txt_target.Text  = "";
                    target_y.Text    = "";
                    sSlab_Edt_Seq_Tg = "0";
                }

                return;
            }

            if (opt_sent.Checked == false & opt_cancel.Checked == false & opt_move.Checked == false & opt_delete.Checked == false & opt_return.Checked == false)
            {
                txt_to.Text = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_NO].Text;

                if (txt_to.Text.Trim().Length == 10)
                {
                    SDB_SLAB_EDT_SEQ.Text = ss1.ActiveSheet.Cells[ROW, SS1_SLAB_EDT_SEQ].Text;
                    p_Ref(2, 2, false, false);
                }

                txt_to.Text = "";
            }
        }
Ejemplo n.º 4
0
        public override void Form_Ref()
        {
            string sTemp;
            string sL2_Send;
            string sSlab_No;
            string sPrc_Sts;
            string sProd_Date;
            string sHcr_Fl;
            int    iOrd_cnt;
            int    iRow;
            int    iCol;
            Color  cBackColor;
            string sUrgnt_Fl;
            string sOVER_FL;

            string sSmpdote;
            string sDate;

            if (p_Ref(1, 1, false, false))
            {
                SpreadCommon.Gf_Sp_Cls(Sc2);
                SpreadCommon.Gf_Sp_Cls(Sc3);

                sSlab_Edt_Seq_Fr = "0";
                sSlab_Edt_Seq_To = "0";
                sSlab_Edt_Seq_Tg = "0";
            }

            for (iRow = 1; iRow <= ss1.ActiveSheet.RowCount; iRow++)
            {
                sSlab_No   = ss1.ActiveSheet.Cells[iRow - 1, SS1_SLAB_NO].Text.Trim();
                sL2_Send   = ss1.ActiveSheet.Cells[iRow - 1, SS1_L2_SEND].Text.Trim();
                sPrc_Sts   = ss1.ActiveSheet.Cells[iRow - 1, SS1_PRC_STS].Text.Trim();
                iOrd_cnt   = convertI(ss1.ActiveSheet.Cells[iRow - 1, SS1_ORD_CNT].Text.Trim());
                sProd_Date = ss1.ActiveSheet.Cells[iRow - 1, SS1_PROD_DATE].Text.Trim();
                sHcr_Fl    = ss1.ActiveSheet.Cells[iRow - 1, SS1_HCR_FL].Text.Trim();
                sUrgnt_Fl  = ss1.ActiveSheet.Cells[iRow - 1, SS1_URGNT_FL].Text.Trim();
                sOVER_FL   = ss1.ActiveSheet.Cells[iRow - 1, SS1_OVER_FL].Text.Trim();

                sSmpdote = ss1.ActiveSheet.Cells[iRow - 1, SS1_SMP_DOTE1].Text.Trim();
                sDate    = ss1.ActiveSheet.Cells[iRow - 1, SS1_DATE].Text.Trim();


                if (sPrc_Sts == "B")
                {
                    Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, iRow - 1, iRow - 1, Color.Black, SSPpdt.BackColor);
                }
                else
                {
                    if (sL2_Send == "Y")
                    {
                        Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, iRow - 1, iRow - 1, Color.Black, SSPsend.BackColor);
                    }
                }

                if (iOrd_cnt > 1)
                {
                    Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, iRow - 1, iRow - 1, Color.Black, SSOrd.BackColor);
                }

                cBackColor = ss1.ActiveSheet.Cells[iRow - 1, 0].BackColor;

                if (sProd_Date == "" && sHcr_Fl == "H")
                {
                    Gp_Sp_BlockColor(ss1, SS1_SLAB_NO, SS1_SLAB_NO, iRow - 1, iRow - 1, Color.Red, cBackColor);
                }
                //紧急订单绿色显示 add by liqian 2012-08-16
                if (sUrgnt_Fl == "Y")
                {
                    Gp_Sp_BlockColor(ss1, SS1_SLAB_NO, SS1_SLAB_NO, iRow - 1, iRow - 1, Color.Green, Color.White);
                    Gp_Sp_BlockColor(ss1, SS1_ORD_NO, SS1_ORD_NO, iRow - 1, iRow - 1, Color.Green, Color.White);
                    Gp_Sp_BlockColor(ss1, SS1_URGNT_FL, SS1_URGNT_FL, iRow - 1, iRow - 1, Color.Green, Color.White);
                }

                if (sOVER_FL != "")
                {
                    Gp_Sp_BlockColor(ss1, SS1_OVER_FL, SS1_OVER_FL, iRow - 1, iRow - 1, Color.Red, Color.White);
                }

                if (convertX(sDate) < convertX(sSmpdote))
                {
                    Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, iRow - 1, iRow - 1, Color.Red, Color.White);
                }
            }
            ss1.ActiveSheet.SetActiveCell(ss1.ActiveSheet.RowCount - 1, 0);
        }