Пример #1
0
        /// <summary>
        /// 窗体控件的数据绑定
        /// </summary>
        private void DataBindFuntion()
        {
            string drawingstr = string.Empty;
            string sqlstr     = string.Empty;
            string responuser = string.Empty;

            this.DRAWINGNOcomboBox.Items.Clear();
            if (this.DRAWINGNOcomboBox.Text.Length != 0)
            {
                this.DRAWINGNOcomboBox.Text.Remove(0);
            }
            this.querybtn.Enabled = true;
            this.DRAWINGNOcomboBox.Items.Clear();

            if (this.drawingrbn.Checked == true)
            {
                sqlstr = "SELECT DRAWING_NO FROM PLM.PROJECT_DRAWING_TAB where drawing_type is null AND Project_Id = (select T.ID from PROJECT_TAB T where T.NAME='" + this.textBox1.Text.ToString() + "') AND DOCTYPE_ID IN (7)  AND DOCTYPE_ID != 71  AND LASTFLAG = 'Y' AND NEW_FLAG = 'Y' AND DELETE_FLAG = 'N' ORDER BY DRAWING_ID DESC";
            }
            else if (this.modifyrbn.Checked == true)
            {
                sqlstr = "SELECT DRAWING_NO FROM PLM.PROJECT_DRAWING_TAB where drawing_type is null AND Project_Id = (select T.ID from PROJECT_TAB T where T.NAME='" + this.textBox1.Text.ToString() + "') AND DRAWING_NO IN (SELECT DISTINCT S.MODIFYDRAWINGNO FROM SP_SPOOL_TAB S WHERE S.FLAG = 'Y' AND S.MODIFYDRAWINGNO IS NOT NULL) AND DOCTYPE_ID = 71 AND LASTFLAG = 'Y' AND NEW_FLAG = 'Y' AND DELETE_FLAG = 'N' ORDER BY DRAWING_ID DESC";
            }
            FillComboBox.GetFlowStatus(this.DRAWINGNOcomboBox, sqlstr);

            DataSet ds = new DataSet();

            drawingstr = "SELECT distinct PLM.USER_API.CHINESENAME(RESPONSIBLE_USER) FROM PLM.PROJECT_DRAWING_TAB where Project_Id = (select T.ID from PROJECT_TAB T where T.NAME='" + this.textBox1.Text.ToString() + "') AND DOCTYPE_ID IN (7)  AND DOCTYPE_ID != 71  AND LASTFLAG = 'Y' AND NEW_FLAG = 'Y' AND DELETE_FLAG = 'N'";
            FillComboBox.GetFlowStatus(this.RESPONSIBLEcb, drawingstr);
            responuser = "******" + this.textBox1.Text.ToString() + "') AND DOCTYPE_ID IN (7)  AND DOCTYPE_ID != 71  AND LASTFLAG = 'Y' AND NEW_FLAG = 'Y' AND DELETE_FLAG = 'N' ORDER BY DRAWING_ID DESC";
            User.DataBaseConnect(responuser, ds);
            this.DrawingsDgv.DataSource = ds.Tables[0];
            ds.Dispose();
            SetStatus();
        }
Пример #2
0
 public CableListFrm()
 {
     InitializeComponent();
     drwtb.Text    = ProjectDrawingCableFrm.drawingno;
     drwentb.Text  = ProjectDrawingCableFrm.drawingtitle;
     drwcntb.Text  = ProjectDrawingCableFrm.drawingtitlecn;
     textBox1.Text = ProjectDrawingCableFrm.duty;
     DataBind(sql);
     FillComboBox.GetFlowStatus(fequipcb, devicesql);
     FillComboBox.GetFlowStatus(tequipcb, devicesql);
     FillComboBox.GetFlowStatus(cablesizecb, cablesizesql);
 }