Example #1
0
        public void ByIDDeleteStationID(string RstationID, OleExec sfcdb)
        {
            T_R_Station station;

            try
            {
                station = new T_R_Station(sfcdb, DBTYPE);
                station.DeleteByRStationID(RstationID, sfcdb);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Example #2
0
        /// <summary>
        /// 根據ID刪除工站
        /// </summary>
        /// <param name="requestValue"></param>
        /// <param name="Data"></param>
        /// <param name="StationReturn"></param>
        public void ByIDDeleteStation(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn)
        {
            OleExec     sfcdb;
            T_R_Station station;
            string      ID = Data["ID"].ToString();

            sfcdb = this.DBPools["SFCDB"].Borrow();
            try
            {
                sfcdb.BeginTrain();
                station = new T_R_Station(sfcdb, DBTYPE);
                station.DeleteByRStationID(ID, sfcdb);
                sfcdb.CommitTrain();
                StationReturn.Status      = StationReturnStatusValue.Pass;
                StationReturn.MessageCode = "MES00000004";
                this.DBPools["SFCDB"].Return(sfcdb);
            }
            catch (Exception e)
            {
                sfcdb.RollbackTrain();
                this.DBPools["SFCDB"].Return(sfcdb);
                throw e;
            }
        }