Exemple #1
0
 public PUMPCtrl()
 {
     InitializeComponent();
     TxbSURVEY_ID.CharacterCasing = CharacterCasing.Upper;
     pPUMP = new PUMP();
     TxbSURVEY_ID.TextChanged += new EventHandler(TxbSURVEY_ID_TextChanged);
 }
Exemple #2
0
        public IPipeData GetData()
        {
            if (pPUMP == null)
            {
                pPUMP = new PUMP();
            }
            pPUMP.ID = TxbID.Text;
            pPUMP.ACQUISITION_DATE = TxbACQUISITION_DATE.Text;

            pPUMP.X            = TxbCo_X.Text;
            pPUMP.Y            = TxbCO_Y.Text;
            pPUMP.GROUND_LEVEL = TxbGROUND_LEVEL.Text;
            pPUMP.BOTTOM_LEVEL = TxbBOTTOM_LEVEL.Text;
            // TxbPROCESS_DATE.Text = pPipePoint.PROCESS_Date;
            //TxbPROCESS_UNIT.Text = pPipePoint.PROCESS_Unit;
            pPUMP.ROAD_NAME   = TxbROAD_NAME.Text;
            pPUMP.STATE       = TxbSTATE.Text;
            pPUMP.SURVEY_ID   = TxbSURVEY_ID.Text;
            pPUMP.SYSTEM_TYPE = TxbSYSTEM_TYPE.Text;

            pPUMP.BOTTOM_AREA = TxbBOTTOM_AREA.Text;
            pPUMP.TOP_LEVEL   = TxbTOP_LEVEL.Text;
            pPUMP.TOP_AREA    = TxbTOP_AREA.Text;
            pPUMP.WATER_LEVEL = TxbWATER_LEVEL.Text;
            pPUMP.Remark      = TxbRemark.Text;
            return(pPUMP);
        }
Exemple #3
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);
        }
Exemple #4
0
 public void SetNewID()
 {
     if (pPUMP == null)
     {
         pPUMP = new PUMP();
     }
     TxbID.Text = pPUMP.GetNewID();
 }