public IPipeData GetData() { if (pCANAL == null) { pCANAL = new CANAL(); } pCANAL.ID = TxbID.Text; pCANAL.ACQUISITION_DATE = TxbACQUISITION_DATE.Text; pCANAL.ACQUISITION_UNIT = TxbACQUISITION_UNIT.Text; pCANAL.PROCESS_Date = TxbPROCESS_DATE.Text; pCANAL.PROCESS_Unit = TxbPROCESS_UNIT.Text; pCANAL.ROAD_NAME = TxbROAD_NAME.Text; pCANAL.STATE = TxbSTATE.Text; pCANAL.SYSTEM_TYPE = TxbSYSTEM_TYPE.Text; pCANAL.Height = TxbHEIGHT.Text; pCANAL.DS_INVERT_LEVEL = TxbDS_INVERT_LEVEL.Text; pCANAL.DS_OBJECT_ID = TxbDS_OBJECT_ID.Text; pCANAL.DS_POINT_INVERT_LEVEL = TxbDS_POINT_INVERT_LEVEL.Text; pCANAL.DS_SURVEY_ID = TxbDS_SURVEY_ID.Text; pCANAL.MATERIAL = TxbMATERIAL.Text; pCANAL.Pipe_Length = TxbPipe_Length.Text; pCANAL.PRESSURE = TxbPRESSURE.Text; pCANAL.SEDIMENT_DEPTH = TxbSEDIMENT_DEPTH.Text; pCANAL.US_INVERT_LEVEL = TxbUS_INVERT_LEVEL.Text; pCANAL.US_OBJECT_ID = TxbUS_OBJECT_ID.Text; pCANAL.US_POINT_INVERT_LEVEL = TxbUS_POINT_INVERT_LEVEL.Text; pCANAL.US_SURVEY_ID = TxbUS_SURVEY_ID.Text; pCANAL.Width = TxbWidth.Text; pCANAL.Remark = TxbRemark.Text; return(pCANAL); }
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); }
public void SetNewID() { if (pCANAL == null) { pCANAL = new CANAL(); } TxbID.Text = pCANAL.GetNewID(); }