Example #1
0
        public IPipeData GetData()
        {
            if (pSLUICE == null)
            {
                pSLUICE = new SLUICE();
            }


            pSLUICE.ID = TxbID.Text;
            pSLUICE.ACQUISITION_DATE = TxbACQUISITION_DATE.Text;
            pSLUICE.ACQUISITION_UNIT = TxbACQUISITION_UNIT.Text;

            pSLUICE.PROCESS_Date = TxbPROCESS_DATE.Text;
            pSLUICE.PROCESS_Unit = TxbPROCESS_UNIT.Text;
            pSLUICE.ROAD_NAME    = TxbROAD_NAME.Text;
            pSLUICE.STATE        = TxbSTATE.Text;
            pSLUICE.Width        = TxbWIDTH.Text;
            pSLUICE.INVERT_LEVEL = TxbINVERT_LEVEL.Text;
            pSLUICE.SLUICE_TYPE  = TxbSLUICE_TYPE.Text;
            //pSLUICE.Flap_number = TxbFLAP_NUMBER.Text;
            pSLUICE.DS_OBJECT_ID = TxbDS_OBJECT_ID.Text;

            pSLUICE.DS_SURVEY_ID = TxbDS_SURVEY_ID.Text;

            pSLUICE.US_OBJECT_ID = TxbUS_OBJECT_ID.Text;

            pSLUICE.US_SURVEY_ID = TxbUS_SURVEY_ID.Text;

            pSLUICE.Remark = TxbRemark.Text;
            return(pSLUICE);
        }
Example #2
0
        public static IPipeData GetDataByID(string ID, string TableName)
        {
            IPipeData pPipeData = null;

            if (TableName.Equals("PS_MANHOLE"))
            {
                pPipeData = new MANHOLE();
            }
            else if (TableName.Equals("PS_VIRTUAL_POINT"))
            {
                pPipeData = new PipePoint();
            }
            else if (TableName.Equals("PS_COMB"))
            {
                pPipeData = new COMB();
            }
            else if (TableName.Equals("PS_OUTFALL"))
            {
                pPipeData = new OUTFALL();
            }

            else if (TableName.Equals("PS_PUMP_STORAGE"))
            {
                pPipeData = new PUMP();
            }
            else if (TableName.Equals("PS_PIPE"))
            {
                pPipeData = new PIPELineClass();
            }
            else if (TableName.Equals("PS_CANAL"))
            {
                pPipeData = new CANAL();
            }
            else if (TableName.Equals("PS_FLAP"))
            {
                pPipeData = new FLAP();
            }
            else if (TableName.Equals("PS_WEIR"))
            {
                pPipeData = new WEIR();
            }
            else if (TableName.Equals("PS_SLUICE"))
            {
                pPipeData = new SLUICE();
            }
            else
            {
                pPipeData = null;
            }
            if (pPipeData == null)
            {
                return(null);
            }
            string    sql    = string.Format("select * from {0} where ID='{1}'", TableName, ID);
            DataTable pTable = SysDBUnitiy.OleDataBase.ExecuteQuery(sql).Tables[0];

            pPipeData.FillValueByRow(pTable.Rows[0], TableName);
            return(pPipeData);
        }
Example #3
0
 public void SetNewID()
 {
     if (pSLUICE == null)
     {
         pSLUICE = new SLUICE();
     }
     TxbID.Text = pSLUICE.GetNewID();
 }
Example #4
0
 public SLUICECtrl()
 {
     InitializeComponent();
     pSLUICE = new SLUICE();
 }