示例#1
0
        public void DeleteCAqltype(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn)
        {
            T_C_SKU_SAMPLE SAMPLE = null;
            OleExec        sfcdb  = null;

            try
            {
                sfcdb  = this.DBPools["SFCDB"].Borrow();
                SAMPLE = new T_C_SKU_SAMPLE(sfcdb, DB_TYPE_ENUM.Oracle);

                Row_C_SKU_SAMPLE r      = (Row_C_SKU_SAMPLE)SAMPLE.GetObjByID((Data["ID"].ToString()).Trim(), sfcdb);
                string           strRet = sfcdb.ExecSQL(r.GetDeleteString(DB_TYPE_ENUM.Oracle));
                if (Convert.ToInt32(strRet) > 0)
                {
                    StationReturn.Message = "刪除成功!!";
                    StationReturn.Status  = StationReturnStatusValue.Pass;
                    StationReturn.Data    = "";
                }
                else
                {
                    StationReturn.MessageCode = "MES00000036";
                    StationReturn.Status      = StationReturnStatusValue.Fail;
                    StationReturn.Data        = "";
                }
                this.DBPools["SFCDB"].Return(sfcdb);
            }
            catch (Exception e)
            {
                this.DBPools["SFCDB"].Return(sfcdb);
                throw e;
            }
        }
示例#2
0
        public void UpdateCSkuSample(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn)
        {
            T_C_SKU_SAMPLE SAMPLE = null;
            OleExec        sfcdb  = null;

            try
            {
                sfcdb  = this.DBPools["SFCDB"].Borrow();
                SAMPLE = new T_C_SKU_SAMPLE(sfcdb, DB_TYPE_ENUM.Oracle);
                Row_C_SKU_SAMPLE r = (Row_C_SKU_SAMPLE)SAMPLE.GetObjByID((Data["ID"].ToString()).Trim(), sfcdb);
                r.SKUNO        = (Data["SKUNO"].ToString()).Trim();
                r.STATION_NAME = (Data["STATION_NAME"].ToString()).Trim();
                r.AQL_TYPE     = (Data["AQL_TYPE"].ToString()).Trim();
                r.EDIT_EMP     = this.LoginUser.EMP_NO;
                r.EDIT_TIME    = GetDBDateTime();
                string strRet = sfcdb.ExecSQL(r.GetUpdateString(DB_TYPE_ENUM.Oracle));
                if (Convert.ToInt32(strRet) > 0)
                {
                    StationReturn.Message = "修改成功!!";
                    StationReturn.Status  = StationReturnStatusValue.Pass;
                    StationReturn.Data    = "";
                }
                else
                {
                    StationReturn.MessageCode = "MES00000036";
                    StationReturn.Status      = StationReturnStatusValue.Fail;
                    StationReturn.Data        = "";
                }
                this.DBPools["SFCDB"].Return(sfcdb);
            }
            catch (Exception e)
            {
                this.DBPools["SFCDB"].Return(sfcdb);
                throw e;
            }
        }