Example #1
0
        public static PanelInfor GetPanelTitleBlockInfo(string projectName, string blockName, string paenlName)
        {
            PanelInfor curPanel = new PanelInfor()
            {
                BlockName = blockName, HullNO = MySQLHelper.GetCurProjectNumber_TitleBlock(projectName), PanelName = paenlName
            };
            string        sqlcommand = $"select * from tb_Schedule where Project='{projectName}' and BLOCK='{blockName}' and Panel='{paenlName}'";
            SqlDataReader sdr        = SqlHelper.MyExecuteReader(sqlcommand); //调用自己编写的sqlhelper类

            if (sdr.HasRows)                                                  //判断行不为空
            {
                while (sdr.Read())                                            //循环读取数据,知道无数据为止
                {
                    curPanel.PanelDecription = sdr["DESCRIPTION"].ToString();
                    curPanel.DoneBy          = MySQLHelper.GetUserShortName(sdr["DoneBy"].ToString());
                    curPanel.MSSref          = sdr["MSSREFNO"].ToString().Replace(projectName + "-", "");
                    break;
                }
            }
            curPanel.ItemNo  = MySQLHelper.GetBlockItemNo(projectName, blockName);
            curPanel.CheckBy = MySQLHelper.GetUserShortName(MySQLHelper.GetBlocksLe(projectName, blockName)) +
                               "/" + MySQLHelper.GetUserShortName(MySQLHelper.GetProjectLe(projectName)) +
                               "/" + MySQLHelper.GetKFLEName(projectName);
            return(curPanel);
        }
 private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.CurPanel = MySQLHelper.GetPanelTitleBlockInfo(this.comboBox1.Text, this.comboBox2.Text, this.comboBox3.Text);
 }