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


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

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

            pIWEIR.DS_SURVEY_ID = TxbDS_SURVEY_ID.Text;

            pIWEIR.US_OBJECT_ID = TxbUS_OBJECT_ID.Text;

            pIWEIR.US_SURVEY_ID = TxbUS_SURVEY_ID.Text;

            pIWEIR.Remark = TxbRemark.Text;
            return(pIWEIR);
        }
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 (pIWEIR == null)
     {
         pIWEIR = new WEIR();
     }
     TxbID.Text = pIWEIR.GetNewID();
 }
Example #4
0
 public WEIRCtrl()
 {
     InitializeComponent();
     pIWEIR = new WEIR();
 }